aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorThierry Crozat2016-09-05 23:29:06 +0100
committerThierry Crozat2016-09-05 23:39:59 +0100
commit77357ff71ac144f553bbd390c6f2585d7ad9da9d (patch)
tree929bd3eaca55d729618f09d6a38623f9ecdbfd83 /backends
parent817211b2edb94961b65ed7424e886a4609951c0e (diff)
downloadscummvm-rg350-77357ff71ac144f553bbd390c6f2585d7ad9da9d.tar.gz
scummvm-rg350-77357ff71ac144f553bbd390c6f2585d7ad9da9d.tar.bz2
scummvm-rg350-77357ff71ac144f553bbd390c6f2585d7ad9da9d.zip
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.
Diffstat (limited to 'backends')
-rw-r--r--backends/networking/sdl_net/handlerutils.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/backends/networking/sdl_net/handlerutils.cpp b/backends/networking/sdl_net/handlerutils.cpp
index 121fd1a77e..73ddf9e83f 100644
--- a/backends/networking/sdl_net/handlerutils.cpp
+++ b/backends/networking/sdl_net/handlerutils.cpp
@@ -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;
+ }
}
}