From 50be087f7bd5fe5a5c8bb7211ae64d9a3bf61f41 Mon Sep 17 00:00:00 2001 From: "jfrancis%netscape.com" Date: Tue, 16 Jul 2002 22:17:56 +0000 Subject: [PATCH] fix for Bug 154932: Mozilla will not start on MacOS 8.6 if filesharing is on. Corrected the construction of an FSSpec in nsDirectoryService.cpp r=ccarlen sr=sfraser git-svn-id: svn://10.0.0.236/trunk@125329 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/io/nsDirectoryService.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mozilla/xpcom/io/nsDirectoryService.cpp b/mozilla/xpcom/io/nsDirectoryService.cpp index f6aec843301..154c4380d76 100644 --- a/mozilla/xpcom/io/nsDirectoryService.cpp +++ b/mozilla/xpcom/io/nsDirectoryService.cpp @@ -167,7 +167,7 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) // get info for the the current process to determine the directory // its located in OSErr err; - ProcessSerialNumber psn = {kNoProcess, kCurrentProcess}; + ProcessSerialNumber psn = {kNoProcess, kCurrentProcess}; ProcessInfoRec pInfo; FSSpec tempSpec; @@ -180,11 +180,10 @@ nsDirectoryService::GetCurrentProcessDirectory(nsILocalFile** aFile) err = GetProcessInformation(&psn, &pInfo); if (!err) { - FSSpec appFSSpec = *(pInfo.processAppSpec); + // create an FSSpec from the volume and dirid of the app. + FSSpec appFSSpec; + ::FSMakeFSSpec(pInfo.processAppSpec->vRefNum, pInfo.processAppSpec->parID, 0, &appFSSpec); - // Truncate the nsame so the spec is just to the app directory - appFSSpec.name[0] = 0; - nsCOMPtr localFileMac = do_QueryInterface((nsIFile*)localFile); if (localFileMac) {