Skip to content

Commit 462dd91

Browse files
authored
Makes tar-fs able to pack files that are actively being written to. (#88)
* Allows tar-fs to pack files that are actively being written to. * Adds a package-lock.json * Removes package-lock.json changes. Whoops! 😅
1 parent 6e10685 commit 462dd91

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ exports.pack = function (cwd, opts) {
138138
var entry = pack.entry(header, onnextentry)
139139
if (!entry) return
140140

141-
var rs = mapStream(xfs.createReadStream(path.join(cwd, filename)), header)
141+
var rs = mapStream(xfs.createReadStream(path.join(cwd, filename), { start: 0, end: header.size > 0 ? header.size - 1 : header.size }), header)
142142

143143
rs.on('error', function (err) { // always forward errors on destroy
144144
entry.destroy(err)

0 commit comments

Comments
 (0)