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.
git-svn-id: svn://10.0.0.236/trunk@47943 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user