From ed56a8ea11a8c4f3398bef4234513ad1c1b08b21 Mon Sep 17 00:00:00 2001 From: Tim Robinson Date: Tue, 13 Sep 2016 12:54:35 +0000 Subject: [PATCH] Make removedPaths object consistent with changedPaths --- plugins/c9.ide.watcher/gui.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/c9.ide.watcher/gui.js b/plugins/c9.ide.watcher/gui.js index 1497cd69..333ea890 100644 --- a/plugins/c9.ide.watcher/gui.js +++ b/plugins/c9.ide.watcher/gui.js @@ -472,7 +472,7 @@ define(function(require, exports, module) { fs.stat(tab.path, function(err, data) { if (err && err.code === "ENOENT") { - removedPaths[tab.path] = tab; + removedPaths[tab.path] = {tab: tab}; if (deleteDialog) { // The dialog is visible @@ -513,14 +513,14 @@ define(function(require, exports, module) { if (all) { for (var id in removedPaths) { - doc = removedPaths[id].document; + doc = removedPaths[id].tab.document; doc.undoManager.bookmark(-2); doc.meta.newfile = true; } removedPaths = {}; } else { - doc = removedPaths[path].document; + doc = removedPaths[path].tab.document; doc.undoManager.bookmark(-2); doc.meta.newfile = true; delete removedPaths[path]; @@ -531,12 +531,12 @@ define(function(require, exports, module) { function(all, cancel) { // No if (all) { for (var id in removedPaths) { - closeTab(removedPaths[id], true); + closeTab(removedPaths[id].tab, true); } removedPaths = {}; } else { - closeTab(removedPaths[path]); + closeTab(removedPaths[path].tab); delete removedPaths[path]; }