Permalink
Browse files

Fixed bug when appending a file whose size is a multiple of 512 bytes

  • Loading branch information...
beatgammit committed Aug 1, 2011
1 parent 9c089cf commit 84f5e0b4df52132f0c860b87e66ad3d1922100c4
Showing with 4 additions and 4 deletions.
  1. +3 −3 lib/tar.js
  2. +1 −1 package.json
View
@@ -56,8 +56,8 @@
checksum: ' ',
type: '0', // just a file
ustar: 'ustar ',
- owner: '',
- group: ''
+ owner: opts.owner || '',
+ group: opts.group || ''
};
// calculate the checksum
@@ -88,7 +88,7 @@
this.out.set(input, this.written);
// to the nearest multiple of recordSize
- this.written += input.length + (recordSize - (input.length % recordSize));
+ this.written += input.length + (recordSize - (input.length % recordSize || recordSize));
// make sure there's at least 2 empty records worth of extra space
if (this.out.length - this.written < recordSize * 2) {
View
@@ -1,7 +1,7 @@
{
"name": "tar-js",
"description": "Tar implemented in the browser",
- "version": "0.1.0",
+ "version": "0.1.1",
"homepage": "http://github.com/beatgammit/tar-js",
"repository": {
"type": "git",

0 comments on commit 84f5e0b

Please sign in to comment.