Bug 1299234 - Fix incorrect if statement block in AppendDistroSearchDirs(). draft
authorCykesiopka <cykesiopka.bmo@gmail.com>
Wed, 31 Aug 2016 01:33:54 +0800
changeset 407627 90664e24b3bb3dbfaad623ca52b980105bbe213e
parent 407626 75ab2126e8087b538868ecf9439c7f9163bce9f3
child 529907 14e9440d9f74fbd407c5a7965f8738e21956abde
push id27999
push usercykesiopka.bmo@gmail.com
push dateTue, 30 Aug 2016 17:35:37 +0000
bugs1299234
milestone51.0a1
Bug 1299234 - Fix incorrect if statement block in AppendDistroSearchDirs(). MozReview-Commit-ID: 4aPyJmHnCJ
browser/components/dirprovider/DirectoryProvider.cpp
--- a/browser/components/dirprovider/DirectoryProvider.cpp
+++ b/browser/components/dirprovider/DirectoryProvider.cpp
@@ -112,19 +112,20 @@ AppendDistroSearchDirs(nsIProperties* aD
     if (NS_SUCCEEDED(rv)) {
 
       nsCOMPtr<nsIFile> defLocalePlugins;
       rv = localePlugins->Clone(getter_AddRefs(defLocalePlugins));
       if (NS_SUCCEEDED(rv)) {
 
         defLocalePlugins->AppendNative(defLocale);
         rv = defLocalePlugins->Exists(&exists);
-        if (NS_SUCCEEDED(rv) && exists)
+        if (NS_SUCCEEDED(rv) && exists) {
           array.AppendObject(defLocalePlugins);
           return; // all done
+        }
       }
     }
 
     // we didn't have a defaultLocale, use the user agent locale
     nsCString locale;
     nsCOMPtr<nsIPrefLocalizedString> prefString;
     rv = prefs->GetComplexValue("general.useragent.locale",
                                 NS_GET_IID(nsIPrefLocalizedString),