Skip to content

Commit

Permalink
Invoke callbacks of overriden calls
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Apr 13, 2012
1 parent 597c848 commit 58de795
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/fs/write-file.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ exports = module.exports = function (path, data, encoding_, callback) {
var encoding, callback_; var encoding, callback_;
path = resolve(String(path)); path = resolve(String(path));
if (cache[path]) { if (cache[path]) {
if (cache[path] !== true) {
callback_ = cache[path][cache[path].length - 1];
if (typeof callback_ == 'function') {
callback_(null);
}
}
cache[path] = arguments; cache[path] = arguments;
return; return;
} }
Expand Down

0 comments on commit 58de795

Please sign in to comment.