RISCOS: Improve detection of absolute paths

This commit is contained in:
Cameron Cawley 2017-11-21 04:52:21 +00:00 committed by Thierry Crozat
parent 509b12de65
commit 4d2e1d16b1

View File

@ -83,6 +83,9 @@ Common::String RISCOSFilesystemNode::toUnix(Common::String &path) {
if (out.contains("$")) {
char *x = strstr(out.c_str(), "$");
start = x ? x - out.c_str() : -1;
} else if (out.contains(":")) {
char *x = strstr(out.c_str(), ":");
start = x ? x - out.c_str() : -1;
}
for (uint32 ptr = start; ptr < out.size(); ptr += 1) {
@ -101,7 +104,7 @@ Common::String RISCOSFilesystemNode::toUnix(Common::String &path) {
}
}
if (out.contains("$"))
if (out.contains("$") || out.contains(":"))
out = "/" + out;
return out;