mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-17 23:27:37 +00:00
COMPOSER: Handle Mac-style filenames in paths.
This commit is contained in:
parent
fe64e4bd80
commit
452280471b
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user