Skip to content

Commit

Permalink
bugfix for newer versions of node: fs.writeFile
Browse files Browse the repository at this point in the history
Some later versions of node are not happy when fs.writeFile has an
empty call back.

Signed-off-by: Yefu Wang <m@yefu.org>
  • Loading branch information
yefuwang committed Feb 12, 2019
1 parent 80e38cb commit a9bb9dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/localFileServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
thisObj.log("Loading from parent " );
thisObj.parent.load(fileName, function(cont){
thisObj.mkdirP(path.dirname(localfileResized));
fs.writeFile(localfileResized, cont); // Possible thread collision!
fs.writeFile(localfileResized, cont, function(){}); // Possible thread collision!
onSuccess(cont);
}, onError)
}
Expand Down

0 comments on commit a9bb9dc

Please sign in to comment.