COMPOSER: Properly strip down the relative paths

This commit is contained in:
Eugene Sandulenko 2017-11-26 11:15:38 +01:00
parent 5c39f31f75
commit ce0d29fc46

View File

@ -355,6 +355,10 @@ Common::String ComposerEngine::mangleFilename(Common::String filename) {
filename = filename.c_str() + 1;
uint slashesToStrip = _directoriesToStrip;
if (filename.hasPrefix(".."))
slashesToStrip = 1;
while (slashesToStrip--) {
for (uint i = 0; i < filename.size(); i++) {
if (filename[i] != '\\' && filename[i] != ':')