mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 20:32:27 +01:00
Replace calls to octal() with octal integer literals.
This commit is contained in:
@@ -1444,7 +1444,7 @@ function UTF8(str) {
|
||||
}
|
||||
}
|
||||
|
||||
function octal(decimal) parseInt(decimal, 8);
|
||||
var octal = deprecated("octal integer literals", function octal(decimal) parseInt(decimal, 8));
|
||||
|
||||
/**
|
||||
* Iterates over an arbitrary object. The following iterator types are
|
||||
|
||||
@@ -747,7 +747,7 @@ var Buffer = Module("Buffer", {
|
||||
|
||||
try {
|
||||
if (!file.exists())
|
||||
file.create(File.NORMAL_FILE_TYPE, octal(644));
|
||||
file.create(File.NORMAL_FILE_TYPE, 0o644);
|
||||
}
|
||||
catch (e) {
|
||||
util.assert(false, _("save.invalidDestination", e.name));
|
||||
@@ -784,7 +784,7 @@ var Buffer = Module("Buffer", {
|
||||
let privacy = sanitizer.getContext(params.context || this.win);
|
||||
let file = File(params.file);
|
||||
if (!file.exists())
|
||||
file.create(Ci.nsIFile.NORMAL_FILE_TYPE, octal(666));
|
||||
file.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
|
||||
|
||||
let downloadListener = new window.DownloadListener(window,
|
||||
services.Transfer(params.uri, file.URI, "", null, null, null,
|
||||
|
||||
@@ -79,7 +79,7 @@ var Cache = Module("Cache", XPCOM(Ci.nsIRequestObserver), {
|
||||
let dir = File(services.directory.get("ProfD", Ci.nsIFile))
|
||||
.child("dactyl");
|
||||
if (!dir.exists())
|
||||
dir.create(dir.DIRECTORY_TYPE, octal(777));
|
||||
dir.create(dir.DIRECTORY_TYPE, 0o777);
|
||||
return dir.child("cache.zip");
|
||||
}),
|
||||
|
||||
|
||||
@@ -287,7 +287,7 @@ var Help = Module("Help", {
|
||||
const TIME = Date.now();
|
||||
|
||||
if (!FILE.exists() && (/\/$/.test(path) && !/\./.test(FILE.leafName)))
|
||||
FILE.create(FILE.DIRECTORY_TYPE, octal(755));
|
||||
FILE.create(FILE.DIRECTORY_TYPE, 0o755);
|
||||
|
||||
dactyl.initHelp();
|
||||
if (FILE.isDirectory()) {
|
||||
|
||||
@@ -322,7 +322,7 @@ var IO = Module("io", {
|
||||
createTempFile: function createTempFile(ext="txt", label="") {
|
||||
let file = services.directory.get("TmpD", Ci.nsIFile);
|
||||
file.append(config.name + label + "." + ext);
|
||||
file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, octal(666));
|
||||
file.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, 0o666);
|
||||
|
||||
services.externalApp.deleteTemporaryFileOnExit(file);
|
||||
|
||||
|
||||
@@ -544,7 +544,7 @@ var File = Class("File", {
|
||||
mode = File.MODE_WRONLY | File.MODE_CREATE | File.MODE_TRUNCATE;
|
||||
|
||||
if (!perms)
|
||||
perms = octal(644);
|
||||
perms = 0o644;
|
||||
if (!this.exists()) // OCREAT won't create the directory
|
||||
this.create(this.NORMAL_FILE_TYPE, perms);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user