Permalink
Browse files

Invoke callbacks of overriden calls

  • Loading branch information...
1 parent 597c848 commit 58de7950abdc7eb9df27b2e2fbed368f59e4646e @medikoo committed Apr 13, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/fs/write-file.js
View
@@ -44,6 +44,12 @@ exports = module.exports = function (path, data, encoding_, callback) {
var encoding, callback_;
path = resolve(String(path));
if (cache[path]) {
+ if (cache[path] !== true) {
+ callback_ = cache[path][cache[path].length - 1];
+ if (typeof callback_ == 'function') {
+ callback_(null);
+ }
+ }
cache[path] = arguments;
return;
}

0 comments on commit 58de795

Please sign in to comment.