Bug 445136 – Autoconfig files should be looked up in GRE directory, not App directory. r=bsmedberg
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 14 Aug 2008 12:39:54 +0200
changeset 16662 6e8e3acd91753fa5715279aa8955f01f7101e40a
parent 16661 0f7833547da3cb48e126b8d167b2b7139e8a97b7
child 16663 abfdc2e8da35a5ba25f56bdc4f976fcbee00fef7
push idunknown
push userunknown
push dateunknown
reviewersbsmedberg
bugs445136
milestone1.9.1a2pre
Bug 445136 – Autoconfig files should be looked up in GRE directory, not App directory. r=bsmedberg
extensions/pref/autoconfig/src/nsReadConfig.cpp
--- a/extensions/pref/autoconfig/src/nsReadConfig.cpp
+++ b/extensions/pref/autoconfig/src/nsReadConfig.cpp
@@ -279,20 +279,23 @@ nsresult nsReadConfig::openAndEvaluateJS
                                     getter_AddRefs(jsFile));
         if (NS_FAILED(rv)) 
             return rv;
         
 #ifdef XP_MAC
         jsFile->AppendNative(NS_LITERAL_CSTRING("Essential Files"));
 #endif
     } else {
-        rv = NS_GetSpecialDirectory(NS_APP_DEFAULTS_50_DIR,
+        rv = NS_GetSpecialDirectory(NS_GRE_DIR,
                                     getter_AddRefs(jsFile));
         if (NS_FAILED(rv)) 
             return rv;
+        rv = jsFile->AppendNative(NS_LITERAL_CSTRING("defaults"));
+        if (NS_FAILED(rv))
+            return rv;
         rv = jsFile->AppendNative(NS_LITERAL_CSTRING("autoconfig"));
         if (NS_FAILED(rv))
             return rv;
     }
     rv = jsFile->AppendNative(nsDependentCString(aFileName));
     if (NS_FAILED(rv)) 
         return rv;