diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..00022d9c --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +test/fixtures/files/** text eol=lf diff --git a/lib/write-entry.js b/lib/write-entry.js index 78ac49f5..239e4233 100644 --- a/lib/write-entry.js +++ b/lib/write-entry.js @@ -80,8 +80,8 @@ const WriteEntry = warner(class WriteEntry extends MiniPass { if (!this.preservePaths) { const s = stripAbsolutePath(this.path) if (s[0]) { + this.warn('stripping ' + s[0] + ' from absolute path', this.path) this.path = s[1] - this.warn('stripping ' + s[0] + ' from absolute path', p) } } diff --git a/test/pack.js b/test/pack.js index 57e09008..6b06c681 100644 --- a/test/pack.js +++ b/test/pack.js @@ -145,7 +145,7 @@ t.test('pack a dir', t => { cksumValid: true, needPax: false, path: 'dir/', - mode: 0o755, + mode: Number, size: 0, mtime: null, cksum: Number, @@ -173,7 +173,7 @@ t.test('pack a dir', t => { cksumValid: true, needPax: false, path: 'dir/x', - mode: 0o644, + mode: Number, size: 0, mtime: mtime, cksum: Number,