WINTERMUTE: Fixed parentFolder name check when testing for "language"/"languages", Fix bug #6655 (Dead City - hotspot text issue)

Fixed Wintermute incorretly parsing folder names with trailing \

(Windows-only issue)
It seems that calling getParent returns trailing '\' which is absent on POSIX based file systems but not on Windows. This causes Wintermute to load outline_red2.font from russian.dcp, which is not desired. This is fixed by calling it->getName() directly, which returns the folder name (without the trailing '\').
This commit is contained in:
jammm 2015-02-22 02:02:41 +05:30
parent 4f6f0fb148
commit 6ca8d22fb1

View File

@ -227,7 +227,7 @@ bool BaseFileManager::registerPackages() {
// Again, make the parent's name all lowercase to avoid any case
// issues.
Common::String parentName = fileIt->getParent().getName();
Common::String parentName = it->getName();
parentName.toLowercase();
// Avoid registering all the language files