From 695d359ba64f21aa705f4dd132b008efa4562d78 Mon Sep 17 00:00:00 2001 From: "sspitzer%netscape.com" Date: Tue, 27 Jul 1999 23:33:54 +0000 Subject: [PATCH] change the nsIDirectoryIterator::Init interface to match the nsDirectoryIterator ctor: two paramenters, a file spec and a bool for resolveSymlinks. pass in PR_TRUE in the pref and component manager code. this fixes the problem where prefs wouldn't get loaded on the mac! git-svn-id: svn://10.0.0.236/trunk@41358 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/modules/libpref/src/nsPref.cpp | 2 +- mozilla/xpcom/components/nsComponentManager.cpp | 2 +- mozilla/xpcom/io/nsFileSpecImpl.cpp | 4 ++-- mozilla/xpcom/io/nsFileSpecImpl.h | 2 +- mozilla/xpcom/io/nsIFileSpec.idl | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/modules/libpref/src/nsPref.cpp b/mozilla/modules/libpref/src/nsPref.cpp index f289ba7a42b..9b26145a2cc 100644 --- a/mozilla/modules/libpref/src/nsPref.cpp +++ b/mozilla/modules/libpref/src/nsPref.cpp @@ -1351,7 +1351,7 @@ extern "C" JSBool pref_InitInitialObjects() (const nsID&)nsIDirectoryIterator::GetIID(), (void**)&i); NS_ASSERTION(NS_SUCCEEDED(rv), "ERROR: Could not make a directory iterator."); - if (!i || NS_FAILED(i->Init(componentsDir))) + if (!i || NS_FAILED(i->Init(componentsDir, PR_TRUE))) return JS_FALSE; // Get any old child of the components directory. Warning: aliases get resolved, so diff --git a/mozilla/xpcom/components/nsComponentManager.cpp b/mozilla/xpcom/components/nsComponentManager.cpp index 5bbb828127a..64d6f07c29a 100644 --- a/mozilla/xpcom/components/nsComponentManager.cpp +++ b/mozilla/xpcom/components/nsComponentManager.cpp @@ -1758,7 +1758,7 @@ nsComponentManagerImpl::SyncComponentsInDir(RegistrationTime when, nsIFileSpec * nsCOMPtrdirIterator; rv = CreateInstance(NS_DIRECTORYITERATOR_PROGID, NULL, kDirectoryIteratorIID, getter_AddRefs(dirIterator)); if (NS_FAILED(rv)) return rv; - rv = dirIterator->Init(dirSpec); + rv = dirIterator->Init(dirSpec, PR_TRUE); if (NS_FAILED(rv)) return rv; // whip through the directory to register every file diff --git a/mozilla/xpcom/io/nsFileSpecImpl.cpp b/mozilla/xpcom/io/nsFileSpecImpl.cpp index 589604d47a1..b6e92884ee7 100644 --- a/mozilla/xpcom/io/nsFileSpecImpl.cpp +++ b/mozilla/xpcom/io/nsFileSpecImpl.cpp @@ -659,11 +659,11 @@ nsDirectoryIteratorImpl::~nsDirectoryIteratorImpl() } //---------------------------------------------------------------------------------------- -NS_IMETHODIMP nsDirectoryIteratorImpl::Init(nsIFileSpec *parent) +NS_IMETHODIMP nsDirectoryIteratorImpl::Init(nsIFileSpec *parent, PRBool resolveSymlink) //---------------------------------------------------------------------------------------- { delete mDirectoryIterator; - mDirectoryIterator = new nsDirectoryIterator(FILESPEC(parent), PR_FALSE); + mDirectoryIterator = new nsDirectoryIterator(FILESPEC(parent), resolveSymlink); if (!mDirectoryIterator) return NS_ERROR_OUT_OF_MEMORY; return NS_OK; diff --git a/mozilla/xpcom/io/nsFileSpecImpl.h b/mozilla/xpcom/io/nsFileSpecImpl.h index 7ea5a8a28ca..4c6eee6de65 100644 --- a/mozilla/xpcom/io/nsFileSpecImpl.h +++ b/mozilla/xpcom/io/nsFileSpecImpl.h @@ -212,7 +212,7 @@ public: NS_DECL_ISUPPORTS - NS_IMETHOD Init(nsIFileSpec *parent); + NS_IMETHOD Init(nsIFileSpec *parent, PRBool resolveSymlink); NS_IMETHOD exists(PRBool *_retval); diff --git a/mozilla/xpcom/io/nsIFileSpec.idl b/mozilla/xpcom/io/nsIFileSpec.idl index adb3be302fa..9ab92b4809f 100644 --- a/mozilla/xpcom/io/nsIFileSpec.idl +++ b/mozilla/xpcom/io/nsIFileSpec.idl @@ -136,7 +136,7 @@ interface nsIFileSpec : nsISupports [scriptable, uuid(d8c0a083-0868-11d3-915f-d9d889d48e3c)] interface nsIDirectoryIterator : nsISupports { - void Init(in nsIFileSpec parent); + void Init(in nsIFileSpec parent, in boolean resolveSymlink); boolean exists(); void next(); readonly attribute nsIFileSpec currentSpec;