Bug 1050690. r=wesj, a=sledru
authorRichard Newman <rnewman@mozilla.com>
Fri, 08 Aug 2014 13:33:02 -0700
changeset 208283 6b9281a057b7
parent 208282 0c488a1d2142
child 208284 6a7e6708ded1
push id3800
push userryanvm@gmail.com
push date2014-08-09 19:35 +0000
treeherdermozilla-beta@6b9281a057b7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj, sledru
bugs1050690
milestone32.0
Bug 1050690. r=wesj, a=sledru
mobile/android/components/HelperAppDialog.js
--- a/mobile/android/components/HelperAppDialog.js
+++ b/mobile/android/components/HelperAppDialog.js
@@ -68,16 +68,20 @@ HelperAppLauncherDialog.prototype = {
     }
 
     if (url.schemeIs("file")) {
       // If it's in our app directory or profile directory, we never ever
       // want to do anything with it, including saving to disk or passing the
       // file to another application.
       let file = url.QueryInterface(Ci.nsIFileURL).file;
 
+      // Normalize the nsILocalFile in-place. This will ensure that paths
+      // can be correctly compared via `contains`, below.
+      file.normalize();
+
       // TODO: pref blacklist?
 
       let appRoot = FileUtils.getFile("XREExeF", []);
       if (appRoot.contains(file, true)) {
         return false;
       }
 
       let profileRoot = FileUtils.getFile("ProfD", []);