From 26105034da4fcce7ac883c899d781f016559310d Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 8 Nov 2018 00:38:48 +0800 Subject: switch to vuepress --- node_modules/tar/lib/mode-fix.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 node_modules/tar/lib/mode-fix.js (limited to 'node_modules/tar/lib/mode-fix.js') diff --git a/node_modules/tar/lib/mode-fix.js b/node_modules/tar/lib/mode-fix.js new file mode 100644 index 00000000..3363a3b1 --- /dev/null +++ b/node_modules/tar/lib/mode-fix.js @@ -0,0 +1,14 @@ +'use strict' +module.exports = (mode, isDir) => { + mode &= 0o7777 + // if dirs are readable, then they should be listable + if (isDir) { + if (mode & 0o400) + mode |= 0o100 + if (mode & 0o40) + mode |= 0o10 + if (mode & 0o4) + mode |= 0o1 + } + return mode +} -- cgit v1.2.3