Make removedPaths object consistent with changedPaths

pull/358/head
Tim Robinson 2016-09-13 12:54:35 +00:00
rodzic d4d9fb8699
commit ed56a8ea11
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -472,7 +472,7 @@ define(function(require, exports, module) {
fs.stat(tab.path, function(err, data) { fs.stat(tab.path, function(err, data) {
if (err && err.code === "ENOENT") { if (err && err.code === "ENOENT") {
removedPaths[tab.path] = tab; removedPaths[tab.path] = {tab: tab};
if (deleteDialog) { if (deleteDialog) {
// The dialog is visible // The dialog is visible
@ -513,14 +513,14 @@ define(function(require, exports, module) {
if (all) { if (all) {
for (var id in removedPaths) { for (var id in removedPaths) {
doc = removedPaths[id].document; doc = removedPaths[id].tab.document;
doc.undoManager.bookmark(-2); doc.undoManager.bookmark(-2);
doc.meta.newfile = true; doc.meta.newfile = true;
} }
removedPaths = {}; removedPaths = {};
} }
else { else {
doc = removedPaths[path].document; doc = removedPaths[path].tab.document;
doc.undoManager.bookmark(-2); doc.undoManager.bookmark(-2);
doc.meta.newfile = true; doc.meta.newfile = true;
delete removedPaths[path]; delete removedPaths[path];
@ -531,12 +531,12 @@ define(function(require, exports, module) {
function(all, cancel) { // No function(all, cancel) { // No
if (all) { if (all) {
for (var id in removedPaths) { for (var id in removedPaths) {
closeTab(removedPaths[id], true); closeTab(removedPaths[id].tab, true);
} }
removedPaths = {}; removedPaths = {};
} }
else { else {
closeTab(removedPaths[path]); closeTab(removedPaths[path].tab);
delete removedPaths[path]; delete removedPaths[path];
} }