Get rid of extra leading slashes appearing in unix paths. Bug 124873,
r=petejc@optonline.net, sr=brendan. git-svn-id: svn://10.0.0.236/trunk@114303 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -436,7 +436,11 @@ nsLocalFile::AppendRelativePath(const char *fragment)
|
||||
if (*fragment == '/')
|
||||
return NS_ERROR_FILE_UNRECOGNIZED_PATH;
|
||||
|
||||
mPath.Append(NS_LITERAL_CSTRING("/") + nsDependentCString(fragment));
|
||||
if (mPath.Equals("/")) {
|
||||
mPath.Append(nsDependentCString(fragment));
|
||||
} else {
|
||||
mPath.Append(NS_LITERAL_CSTRING("/") + nsDependentCString(fragment));
|
||||
}
|
||||
|
||||
if (!mPath.get())
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
Reference in New Issue
Block a user