Converting to promises broke File.getPath and thus project file de-dupe.
This commit is contained in:
parent
b10a83b64e
commit
6073cdefce
2 changed files with 3 additions and 2 deletions
|
@ -162,7 +162,8 @@ define([
|
|||
getPath: function(c) {
|
||||
var self = this;
|
||||
var promise = new Promise(function(ok, fail) {
|
||||
chrome.fileSystem.getDisplayPath(this.entry, ok);
|
||||
if (!self.entry) return fail("No backing entry, cannot get path")
|
||||
chrome.fileSystem.getDisplayPath(self.entry, ok);
|
||||
});
|
||||
if (c) M.pton(promise, c);
|
||||
return promise;
|
||||
|
|
|
@ -233,7 +233,7 @@ define([
|
|||
if (!tab.file || tab.file.virtual) {
|
||||
return c(false);
|
||||
}
|
||||
tab.file.getPath(function(p) {
|
||||
tab.file.getPath(function(err, p) {
|
||||
if (p == path) {
|
||||
sessions.setCurrent(tab);
|
||||
found = true;
|
||||
|
|
Loading…
Reference in a new issue