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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user