Skip to content

Commit 1138d5f

Browse files
committedJun 5, 2015
define stat octals in decimal form. ref #138
1 parent 32bdebd commit 1138d5f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

‎lib/core.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,13 @@ Archiver.prototype._normalizeEntryData = function(data, stats) {
211211
}
212212
}
213213

214+
// 511 === 0777; 493 === 0755; 420 === 0644
214215
if (typeof data.mode === 'number') {
215-
data.mode &= 0777;
216+
data.mode &= 511;
216217
} else if (data.stats && data.mode === null) {
217-
data.mode = data.stats.mode & 0777;
218+
data.mode = data.stats.mode & 511;
218219
} else if (data.mode === null) {
219-
data.mode = isDir ? 0755 : 0644;
220+
data.mode = isDir ? 493 : 420;
220221
}
221222

222223
if (data.stats && data.date === null) {

0 commit comments

Comments
 (0)
Please sign in to comment.