kopia lustrzana https://github.com/c9/core
Passing path to resolve function to fix race condition with global path variable
rodzic
90baf8a727
commit
ab84c52a13
|
@ -186,7 +186,7 @@ define(function(require, exports, module) {
|
|||
return;
|
||||
}
|
||||
|
||||
function resolve() {
|
||||
function resolve(path) {
|
||||
console.log("[watchers] resolved change event without dialog", path);
|
||||
doc.tab.classList.remove("conflict");
|
||||
delete doc.meta.$merge;
|
||||
|
@ -340,12 +340,12 @@ define(function(require, exports, module) {
|
|||
var doc = tab.document;
|
||||
doc.setBookmarkedValue(data, true);
|
||||
doc.meta.timestamp = Date.now() - settings.timeOffset;
|
||||
changedPaths[path].resolve();
|
||||
changedPaths[path].resolve(path);
|
||||
}
|
||||
|
||||
function mergeChangedPath(err, path, data) {
|
||||
merge(changedPaths[path].tab, data);
|
||||
changedPaths[path].resolve();
|
||||
changedPaths[path].resolve(path);
|
||||
}
|
||||
|
||||
function showChangeDialog(tab, data) {
|
||||
|
@ -368,12 +368,12 @@ define(function(require, exports, module) {
|
|||
if (all) {
|
||||
for (var id in changedPaths) {
|
||||
changedPaths[id].tab.document.undoManager.bookmark(-2);
|
||||
changedPaths[id].resolve();
|
||||
changedPaths[id].resolve(path);
|
||||
}
|
||||
}
|
||||
else {
|
||||
changedPaths[path].tab.document.undoManager.bookmark(-2);
|
||||
changedPaths[path].resolve();
|
||||
changedPaths[path].resolve(path);
|
||||
}
|
||||
checkEmptyQueue();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue