diff options
| author | Filippos Karapetis | 2014-12-16 03:46:31 +0200 | 
|---|---|---|
| committer | Filippos Karapetis | 2014-12-16 03:46:31 +0200 | 
| commit | 8efcc3cf26b80ca0451da4c30113b3610f685467 (patch) | |
| tree | bbf8164300999e3f7eec0f5bd5710c84de17f9ce | |
| parent | 77705752efa00ab7f6c65ff8d99e4d9c3fdc4929 (diff) | |
| download | scummvm-rg350-8efcc3cf26b80ca0451da4c30113b3610f685467.tar.gz scummvm-rg350-8efcc3cf26b80ca0451da4c30113b3610f685467.tar.bz2 scummvm-rg350-8efcc3cf26b80ca0451da4c30113b3610f685467.zip  | |
ZVISION: Bugfix for addDir() - fixes the Nemesis subtitle patch
| -rw-r--r-- | engines/zvision/file/search_manager.cpp | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/zvision/file/search_manager.cpp b/engines/zvision/file/search_manager.cpp index 752b52b01f..1a6a96ec6d 100644 --- a/engines/zvision/file/search_manager.cpp +++ b/engines/zvision/file/search_manager.cpp @@ -38,7 +38,10 @@ SearchManager::SearchManager(const Common::String &rootPath, int depth) {  	listDirRecursive(_dirList, fsNode, depth); -	for (Common::List<Common::String>::iterator it = _dirList.begin(); it != _dirList.end();) +	for (Common::List<Common::String>::iterator it = _dirList.begin(); it != _dirList.end();) { +		if ((*it).hasSuffix("\\") || (*it).hasSuffix("/")) +			(*it).deleteLastChar(); +  		if (it->size() == _root.size())  			it = _dirList.erase(it);  		else if (it->size() > _root.size()) { @@ -46,6 +49,7 @@ SearchManager::SearchManager(const Common::String &rootPath, int depth) {  			it++;  		} else  			it++; +	}  }  SearchManager::~SearchManager() {  | 
