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:
bzbarsky%mit.edu
2002-02-12 21:05:56 +00:00
parent 99107e3775
commit e27ee398e4

View File

@@ -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;