From 4849bd43c87d5cfde096ab60fc2de652d3aa45fb Mon Sep 17 00:00:00 2001 From: natecain Date: Fri, 11 Oct 2013 17:54:47 -0400 Subject: [PATCH] More graceful handling of tiddler delete in filesystemadaptor watch code --- plugins/tiddlywiki/filesystem/filesystemadaptor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/tiddlywiki/filesystem/filesystemadaptor.js b/plugins/tiddlywiki/filesystem/filesystemadaptor.js index c5eb61bcc..9f4e422b8 100644 --- a/plugins/tiddlywiki/filesystem/filesystemadaptor.js +++ b/plugins/tiddlywiki/filesystem/filesystemadaptor.js @@ -188,7 +188,9 @@ FileSystemAdaptor.prototype.deleteTiddler = function(title,callback) { } else { if(this.watchers[fileInfo.filepath]) { this.watchers[fileInfo.filepath].close(); + delete this.watchers[fileInfo.filepath]; } + delete this.pending[fileInfo.filepath]; // Delete the file fs.unlink(fileInfo.filepath,function(err) { if(err) {