Skip to content

Commit dde4f51

Browse files
committed
Node v6
1 parent 003d4cf commit dde4f51

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"url": "https://github.com/cthackers/adm-zip.git"
3434
},
3535
"engines": {
36-
"node": ">=0.3.0"
36+
"node": ">=6.0"
3737
},
3838
"devDependencies": {
3939
"chai": "^4.1.2",

util/fattr.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ module.exports = function(/*String*/path) {
2626
_obj.directory = _stat.isDirectory();
2727
_obj.mtime = _stat.mtime;
2828
_obj.atime = _stat.atime;
29-
_obj.executable = !!(1 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0]));
30-
_obj.readonly = !!(2 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0]));
29+
_obj.executable = (0o111 & _stat.mode) != 0; // file is executable who ever har right not just owner
30+
_obj.readonly = (0o200 & _stat.mode) == 0; // readonly if owner has no write right
3131
_obj.hidden = pth.basename(_path)[0] === ".";
3232
} else {
3333
console.warn("Invalid path: " + _path)

0 commit comments

Comments
 (0)