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); }