Bug 1050690. r=wesj, a=sledru
authorRichard Newman <rnewman@mozilla.com>
Fri, 08 Aug 2014 13:33:02 -0700
changeset 217448 6d461156b9450b051bc99923accae87baad6e3c5
parent 217447 e8ba5bca8c4ca59413790f575ef0c4baa504c582
child 217449 b95fb165577741f3dd12a15c149e7a648cec5a76
push id515
push userraliiev@mozilla.com
push dateMon, 06 Oct 2014 12:51:51 +0000
treeherdermozilla-release@267c7a481bef [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswesj, sledru
bugs1050690
milestone33.0a2
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", []);