Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHindi committed Aug 5, 2019
2 parents 885e434 + b5035d6 commit 58e3e6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ app.all('/', function (request, response) {
pipe: response
, folderName: 'myBucketFolderName'
, startKey: 'keyOfLastFileIZipped' // could keep null
, recursive, true
, recursive: true
}
,function (err, result) {
if(err)
Expand Down
8 changes: 4 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ S3Zipper.prototype = {
zipFileLocation: result.Location,
zippedFiles: r.zippedFiles
});
fs.unlink(params.zipFileName);
fs.unlinkSync(params.zipFileName);
});
}
else {
console.log('no files zipped. nothing to upload');
fs.unlink(params.zipFileName);
fs.unlinkSync(params.zipFileName);
callback(null, {
zipFileETag: null,
zipFileLocation: null,
Expand Down Expand Up @@ -382,7 +382,7 @@ S3Zipper.prototype = {
if (uploadResult) {
result.uploadedFile = uploadResult;
console.log('remove temp file ', localFragName);
fs.unlink(localFragName);
fs.unlinkSync(localFragName);
}
pendingUploads--;
if (pendingUploads == 0 && finalResult) {
Expand Down Expand Up @@ -483,7 +483,7 @@ S3Zipper.prototype = {
fileStream.close();
if (result.zippedFiles.length == 0) /// its an empty zip file get rid of it

fs.unlink(fragFileName);
fs.unlinkSync(fragFileName);

else
events.onFileZipped(fragFileName, result);
Expand Down

0 comments on commit 58e3e6c

Please sign in to comment.