diff options
-rw-r--r-- | engines/wintermute/base/file/base_disk_file.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/wintermute/base/file/base_disk_file.cpp b/engines/wintermute/base/file/base_disk_file.cpp index 2f7450a999..44a8049121 100644 --- a/engines/wintermute/base/file/base_disk_file.cpp +++ b/engines/wintermute/base/file/base_disk_file.cpp @@ -71,14 +71,11 @@ static Common::FSNode getNodeForRelativePath(const Common::String &filename) { // Get the next path-component by slicing on '\\'
Common::String pathPart = path.nextToken();
// Get the next FSNode in the chain, if it exists as a child from the previous.
- Common::FSNode nextNode(curNode.getChild(pathPart));
- if (!nextNode.exists()) {
+ curNode = curNode.getChild(pathPart);
+ if (!curNode.isReadable()) {
// Return an invalid FSNode.
return Common::FSNode();
}
- if (nextNode.exists() && nextNode.isReadable()) {
- curNode = nextNode;
- }
// Following the comments in common/fs.h, anything not a directory is a file.
if (!curNode.isDirectory()) {
if (!path.empty()) {
|