Skip to content

Commit

Permalink
Merge pull request #52 from newclear/master
Browse files Browse the repository at this point in the history
fix: cause node exit when unlink failed.
  • Loading branch information
spout committed Feb 1, 2016
2 parents 94d0104 + e0be928 commit f2af6c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ obj.dir = function(isTiming){
if(isTiming){
var nameList = v.split('_')
if(nameList[2] == pid && (now - nameList[3]>=60*1000*2)){
fs.unlink(p.join(path,v));
fs.unlink(p.join(path,v), function(e){ console.error(e); });
}
}
else{
fs.unlink(p.join(path,v));
fs.unlink(p.join(path,v), function(e){ console.error(e); });
}
} catch(e) {
console.log(e);
Expand Down

0 comments on commit f2af6c6

Please sign in to comment.