Bug 621588 - File permissions should be in octal, not hex [r=blassey]
authorMatt Brubeck <mbrubeck@mozilla.com>
Mon, 27 Dec 2010 18:50:30 -0800
changeset 67165 2aa9aa129d62a757168dde4bc454e52347d891bf
parent 67164 3fd11924ebb889664841bee66815044627eaedba
child 67166 15c875e62aaf3a95464a24011073087638a19f3b
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersblassey
bugs621588
Bug 621588 - File permissions should be in octal, not hex [r=blassey]
mobile/chrome/content/browser-ui.js
--- a/mobile/chrome/content/browser-ui.js
+++ b/mobile/chrome/content/browser-ui.js
@@ -923,17 +923,17 @@ var BrowserUI = {
         stmt.finalize();
 
         let download = dm.getDownload(json.id);
 #ifdef ANDROID
         // since our content process doesn't have write permissions to the
         // downloads dir, we save it to the tmp dir and then move it here
         let dlFile = download.targetFile;
         if (!dlFile.exists())
-          dlFile.create(file.NORMAL_FILE_TYPE, 0x666);
+          dlFile.create(file.NORMAL_FILE_TYPE, 0666);
         let tmpDir = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties).get("TmpD", Ci.nsIFile);  
         let tmpFile = tmpDir.clone();
         tmpFile.append(dlFile.leafName);
 
         // we sometimes race with the content process, so make sure its finished
         // creating/writing the file
         while (!tmpFile.exists());
         tmpFile.moveTo(dlFile.parent, dlFile.leafName);
@@ -1354,17 +1354,17 @@ var PageActions = {
     let downloadsDir = dm.defaultDownloadsDirectory;
 
 #ifdef ANDROID
     // Create the final destination file location
     let file = downloadsDir.clone();
     file.append(fileName);
     // The filename is used below to save the file to a temp location in 
     // the content process. Make sure it's up to date.
-    file.createUnique(file.NORMAL_FILE_TYPE, 0x666);
+    file.createUnique(file.NORMAL_FILE_TYPE, 0666);
     fileName = file.leafName;
 #else
     let strings = Elements.browserBundle;
     let picker = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
     picker.init(window, strings.getString("pageactions.saveas.pdf"), Ci.nsIFilePicker.modeSave);
     picker.appendFilter("PDF", "*.pdf");
     picker.defaultExtension = "pdf";