From c2c951e7f829d79683874391c62cada6f91cc230 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Fri, 12 Feb 1999 00:48:35 +0000 Subject: [PATCH] Fixed += operator, which would only work if you had a file or folder called "G'day" in the input directory. git-svn-id: svn://10.0.0.236/trunk@20479 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/base/src/mac/nsFileSpecMac.cpp | 8 +++++--- mozilla/xpcom/io/nsFileSpecMac.cpp | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/mozilla/base/src/mac/nsFileSpecMac.cpp b/mozilla/base/src/mac/nsFileSpecMac.cpp index 8e7a56ccd44..dfa4da0ec28 100644 --- a/mozilla/base/src/mac/nsFileSpecMac.cpp +++ b/mozilla/base/src/mac/nsFileSpecMac.cpp @@ -671,9 +671,11 @@ void nsNativeFileSpec::operator += (const char* inRelativePath) mError = FSpGetDirectoryID(&mSpec, &dirID, &isDirectory); if (mError == noErr && isDirectory) { - mError = FSMakeFSSpec(mSpec.vRefNum, dirID, "\pG'day", *this); - if (mError == noErr) - SetLeafName(inRelativePath); + Str255 partialPath; + MacFileHelpers::PLstrcpy(partialPath, inRelativePath); + mError = FSMakeFSSpec(mSpec.vRefNum, dirID, partialPath, *this); + //if (mError == noErr) + // SetLeafName(inRelativePath); } } // nsNativeFileSpec::operator += diff --git a/mozilla/xpcom/io/nsFileSpecMac.cpp b/mozilla/xpcom/io/nsFileSpecMac.cpp index 8e7a56ccd44..dfa4da0ec28 100644 --- a/mozilla/xpcom/io/nsFileSpecMac.cpp +++ b/mozilla/xpcom/io/nsFileSpecMac.cpp @@ -671,9 +671,11 @@ void nsNativeFileSpec::operator += (const char* inRelativePath) mError = FSpGetDirectoryID(&mSpec, &dirID, &isDirectory); if (mError == noErr && isDirectory) { - mError = FSMakeFSSpec(mSpec.vRefNum, dirID, "\pG'day", *this); - if (mError == noErr) - SetLeafName(inRelativePath); + Str255 partialPath; + MacFileHelpers::PLstrcpy(partialPath, inRelativePath); + mError = FSMakeFSSpec(mSpec.vRefNum, dirID, partialPath, *this); + //if (mError == noErr) + // SetLeafName(inRelativePath); } } // nsNativeFileSpec::operator +=