CLOUD: Fix looking for the wwwroot.zip archive
If the themepath was defined but the wwwroot.zip file was not in that path, looking for it failed as it never reached the part of the code using SearchMan to look for it.
This commit is contained in:
parent
817211b2ed
commit
77357ff71a
1 changed files with 8 additions and 9 deletions
|
@ -39,15 +39,14 @@ Common::Archive *HandlerUtils::getZipArchive() {
|
|||
// first search in themepath
|
||||
if (ConfMan.hasKey("themepath")) {
|
||||
const Common::FSNode &node = Common::FSNode(ConfMan.get("themepath"));
|
||||
if (!node.exists() || !node.isReadable() || !node.isDirectory())
|
||||
return nullptr;
|
||||
|
||||
Common::FSNode fileNode = node.getChild(ARCHIVE_NAME);
|
||||
if (fileNode.exists() && fileNode.isReadable() && !fileNode.isDirectory()) {
|
||||
Common::SeekableReadStream *const stream = fileNode.createReadStream();
|
||||
Common::Archive *zipArchive = Common::makeZipArchive(stream);
|
||||
if (zipArchive)
|
||||
return zipArchive;
|
||||
if (node.exists() && node.isReadable() && node.isDirectory()) {
|
||||
Common::FSNode fileNode = node.getChild(ARCHIVE_NAME);
|
||||
if (fileNode.exists() && fileNode.isReadable() && !fileNode.isDirectory()) {
|
||||
Common::SeekableReadStream *const stream = fileNode.createReadStream();
|
||||
Common::Archive *zipArchive = Common::makeZipArchive(stream);
|
||||
if (zipArchive)
|
||||
return zipArchive;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue