From 526b5f01258eb310c96e8882d4df85a4ac5cc872 Mon Sep 17 00:00:00 2001 From: Mathias Buus Date: Sat, 21 Dec 2013 02:10:18 +0100 Subject: [PATCH] added mode mask --- headers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headers.js b/headers.js index 51a85a1..b6dc170 100644 --- a/headers.js +++ b/headers.js @@ -90,7 +90,7 @@ exports.encode = function(opts) { } buf.write(name); - buf.write(encodeOct(opts.mode, 6), 100); + buf.write(encodeOct(opts.mode & 07777, 6), 100); buf.write(encodeOct(opts.uid, 6), 108); buf.write(encodeOct(opts.gid, 6), 116); buf.write(encodeOct(opts.size, 11), 124);