[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-launcher/master] Fix deprecated octal literals



commit c5cf235c8f530ef5dc64eea3bb404ca0d48eb0a8
Author: Matthew Finkel <Matthew.Finkel@xxxxxxxxx>
Date:   Fri Feb 23 19:50:01 2018 +0000

    Fix deprecated octal literals
    
    See https://bugzilla.mozilla.org/show_bug.cgi?id=1263074
---
 src/components/tl-process.js | 2 +-
 src/modules/tl-util.jsm      | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/components/tl-process.js b/src/components/tl-process.js
index 74d5f41..8d3efb7 100644
--- a/src/components/tl-process.js
+++ b/src/components/tl-process.js
@@ -978,7 +978,7 @@ TorProcessService.prototype =
       let stream = Cc["@mozilla.org/network/safe-file-output-stream;1"]
                      .createInstance(Ci.nsIFileOutputStream);
       stream.init(aFile, 0x02 | 0x08 | 0x20, /* WRONLY CREATE TRUNCATE */
-                  0600, 0);
+                  0o600, 0);
       stream.write(data, data.length);
       stream.QueryInterface(Ci.nsISafeOutputStream).finish();
     }
diff --git a/src/modules/tl-util.jsm b/src/modules/tl-util.jsm
index a79e2bd..d669112 100644
--- a/src/modules/tl-util.jsm
+++ b/src/modules/tl-util.jsm
@@ -658,9 +658,9 @@ let TorLauncherUtil =  // Public
           try
           {
             if ("tordatadir" == aTorFileType)
-              torFile.create(torFile.DIRECTORY_TYPE, 0700);
+              torFile.create(torFile.DIRECTORY_TYPE, 0o700);
             else
-              torFile.create(torFile.NORMAL_FILE_TYPE, 0600);
+              torFile.create(torFile.NORMAL_FILE_TYPE, 0o600);
           }
           catch (e)
           {
@@ -883,7 +883,7 @@ let TLUtilInternal =  // Private
       let d = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
       d.initWithPath(aBasePath);
       d.append("Tor");
-      d.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0700);
+      d.createUnique(Ci.nsIFile.DIRECTORY_TYPE, 0o700);
       return d;
     }
     catch (e)



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits