diff --git a/src/common/FSNodeZIP.cxx b/src/common/FSNodeZIP.cxx index ab961a33a..72d8ab5c7 100644 --- a/src/common/FSNodeZIP.cxx +++ b/src/common/FSNodeZIP.cxx @@ -58,13 +58,11 @@ FilesystemNodeZIP::FilesystemNodeZIP(const string& p) // TODO: Actually present the error passed in back to the user // For now, we just indicate that no ROMs were found _error = zip_error::NO_ROMS; - return; } _numFiles = myZipHandler->romFiles(); if(_numFiles == 0) { _error = zip_error::NO_ROMS; - return; } // We always need a virtual file/path @@ -92,7 +90,7 @@ FilesystemNodeZIP::FilesystemNodeZIP(const string& p) if(!found) return; } - else + else if(_numFiles > 1) _isDirectory = true; // Create a concrete FSNode to use @@ -137,7 +135,6 @@ void FilesystemNodeZIP::setFlags(const string& zipfile, } _name = lastPathComponent(_path); - _error = zip_error::NONE; if(!_realNode->isFile()) _error = zip_error::NOT_A_FILE; if(!_realNode->isReadable()) diff --git a/src/emucore/FSNode.cxx b/src/emucore/FSNode.cxx index 423a5c902..5a054652b 100644 --- a/src/emucore/FSNode.cxx +++ b/src/emucore/FSNode.cxx @@ -89,10 +89,7 @@ bool FilesystemNode::getChildren(FSList& fslist, ListMode mode) const // Force ZIP c'tor to be called AbstractFSNodePtr ptr = FilesystemNodeFactory::create(i->getPath(), FilesystemNodeFactory::Type::ZIP); - if (ptr->getName() != EmptyString) - fslist.emplace_back(FilesystemNode(ptr)); - else - fslist.emplace_back(FilesystemNode(i)); + fslist.emplace_back(FilesystemNode(ptr)); } else #endif