Get rid of extra leading slashes appearing in unix paths. Bug 124873,

r=petejc@optonline.net, sr=brendan.
This commit is contained in:
bzbarsky%mit.edu 2002-02-12 21:05:56 +00:00
Родитель c3dbc75eb4
Коммит 648c636bba
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

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