mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 08:12:05 +00:00
Make nsFileSpecMac tough enough to deal with a Unix-style path with two or more forward slashes that are right next to each other; e.g., foo//bar/baz.html. Previously, it would convert this to foo::bar:baz.html, which is the Unix equivalent of foo/../bar/baz.html. Oops. Anyway, this keeps Mac from crashing on startup.
This commit is contained in:
parent
3509f48fd2
commit
fa6c2fad91
@ -269,6 +269,14 @@ char* MacFileHelpers::MacPathFromUnixPath(const char* unixPath, Boolean hexDecod
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else if (c == '/' && cprev == '/')
|
||||
{
|
||||
// Hmm. A 'run on' path with two slashes right next to each other.
|
||||
// This is an illegal path, but, hey, we'll be tough and try to
|
||||
// deal with it (especially since '::' has loaded semantics in
|
||||
// a Mac path)
|
||||
continue;
|
||||
}
|
||||
*dst++ = c;
|
||||
} while (c);
|
||||
if (hexDecode)
|
||||
|
Loading…
Reference in New Issue
Block a user