COMPOSER: Handle Mac-style filenames in paths.

This commit is contained in:
Alyssa Milburn 2011-08-24 16:17:07 +02:00
parent fe64e4bd80
commit 452280471b

View File

@ -294,7 +294,7 @@ Common::String ComposerEngine::mangleFilename(Common::String filename) {
uint slashesToStrip = _directoriesToStrip; uint slashesToStrip = _directoriesToStrip;
while (slashesToStrip--) { while (slashesToStrip--) {
for (uint i = 0; i < filename.size(); i++) { for (uint i = 0; i < filename.size(); i++) {
if (filename[i] != '\\') if (filename[i] != '\\' && filename[i] != ':')
continue; continue;
filename = filename.c_str() + i + 1; filename = filename.c_str() + i + 1;
break; break;
@ -303,7 +303,7 @@ Common::String ComposerEngine::mangleFilename(Common::String filename) {
Common::String outFilename; Common::String outFilename;
for (uint i = 0; i < filename.size(); i++) { for (uint i = 0; i < filename.size(); i++) {
if (filename[i] == '\\') if (filename[i] == '\\' || filename[i] == ':')
outFilename += '/'; outFilename += '/';
else else
outFilename += filename[i]; outFilename += filename[i];