From 8953692d7d3ea6e25398ef9e82e054a0805aeff1 Mon Sep 17 00:00:00 2001 From: "dbragg%netscape.com" Date: Fri, 7 Jul 2000 21:54:08 +0000 Subject: [PATCH] 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 --- mozilla/xpcom/io/nsLocalFileMac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla/xpcom/io/nsLocalFileMac.cpp b/mozilla/xpcom/io/nsLocalFileMac.cpp index 6cdb3739e49..bd45c4fcd07 100644 --- a/mozilla/xpcom/io/nsLocalFileMac.cpp +++ b/mozilla/xpcom/io/nsLocalFileMac.cpp @@ -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); }