Skip to content
Browse files

* Fixed: not all dependencies removed when a watched file changes

  • Loading branch information...
1 parent 03fdd1d commit e31730302aa605bc1f4e9c0c4ecc83f2fbe8d84e @joehewitt committed Sep 12, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 diskcache.js
View
4 diskcache.js
@@ -257,7 +257,7 @@ subclass(Cache, events.EventEmitter, {
fs.watchFile(depPath, _.bind(function(curr, prev) {
if (curr.mtime.getTime() != prev.mtime.getTime()) {
D&&D("Modified", depPath, curr.mtime);
- _.each(this.monitors[depPath], function(fn) { fn(); });
+ _.each(this.monitors[depPath].slice(), function(fn) { fn(); });
}
}, this));
}
@@ -284,7 +284,7 @@ subclass(Cache, events.EventEmitter, {
var U = url.parse(URL);
var cachePath = path.join(this.cachePath, U.pathname);
- if (this.useDisk) {
+ if (this.useDisk && this.cachePath) {
mkdirsSync(cachePath);
}

0 comments on commit e317303

Please sign in to comment.
Something went wrong with that request. Please try again.