Fix for bug #42719. SetLeafName was not removing the old leaf name before appending a new one. r=sgehani

git-svn-id: svn://10.0.0.236/trunk@73839 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dbragg%netscape.com
2000-07-07 21:54:08 +00:00
parent 18da283dee
commit 8953692d7d

View File

@@ -1254,7 +1254,7 @@ nsLocalFile::SetLeafName(const char * aLeafName)
if (mAppendedPath.Length())
{ // Lop off the end of the appended path and replace it with the new leaf name
PRInt32 offset = mAppendedPath.RFindChar(':');
if (offset)
if (offset || ((!offset) && (1 < mAppendedPath.Length())))
{
mAppendedPath.Truncate(offset + 1);
}