Skip to content

Commit

Permalink
fix issue with file array being modified
Browse files Browse the repository at this point in the history
  • Loading branch information
mac- committed Jan 31, 2014
1 parent b347966 commit 4082039
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/hash.js
Expand Up @@ -33,7 +33,8 @@ module.exports = function(options, callback) {
files = _.filter(files.sort(), function(file) {
return (file[file.length-1] !== '/');
});
fs.readFiles(files, function(err, data) {
// pass in a clone of the files array since readFiles modifies it
fs.readFiles(files.slice(0), function(err, data) {
if (err) {
return callback(err);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -4,7 +4,7 @@
"contributors": [
"Mac Angell <mac.ang311@gmail.com>"
],
"version": "0.0.1",
"version": "0.0.2",
"dependencies": {
"glob": "3.x.x",
"sha1": "1.x.x",
Expand Down

0 comments on commit 4082039

Please sign in to comment.