Skip to content

Commit

Permalink
make octal numerals modern and coherent
Browse files Browse the repository at this point in the history
  • Loading branch information
arantes555 committed Oct 27, 2020
1 parent d27d0e2 commit 0940964
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/temp.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ const mkdir = (affixes, callback) => {
callback = p[1];

let dirPath = generateName(affixes, 'd-');
mkdirp(dirPath, 0700, (err) => {
mkdirp(dirPath, 0o700, (err) => {
if (!err) {
deleteDirOnExit(dirPath);
}
Expand All @@ -273,7 +273,7 @@ const mkdir = (affixes, callback) => {

const mkdirSync = (affixes) => {
let dirPath = generateName(affixes, 'd-');
mkdirp.sync(dirPath, 0700);
mkdirp.sync(dirPath, 0o700);
deleteDirOnExit(dirPath);
return dirPath;
}
Expand All @@ -286,7 +286,7 @@ const open = (affixes, callback) => {
callback = p[1];

const path = generateName(affixes, 'f-');
fs.open(path, RDWR_EXCL, parseInt('0600', 8), (err, fd) => {
fs.open(path, RDWR_EXCL, 0o600, (err, fd) => {
if (!err) {
deleteFileOnExit(path);
}
Expand All @@ -297,14 +297,14 @@ const open = (affixes, callback) => {

const openSync = (affixes) => {
const path = generateName(affixes, 'f-');
let fd = fs.openSync(path, RDWR_EXCL, parseInt('0600', 8));
let fd = fs.openSync(path, RDWR_EXCL, 0o600);
deleteFileOnExit(path);
return { path, fd };
}

const createWriteStream = (affixes) => {
const path = generateName(affixes, 's-');
let stream = fs.createWriteStream(path, { flags: RDWR_EXCL, mode: parseInt('0600', 8) });
let stream = fs.createWriteStream(path, { flags: RDWR_EXCL, mode: 0o600 });
deleteFileOnExit(path);
return stream;
}
Expand Down

0 comments on commit 0940964

Please sign in to comment.