Converting to promises broke File.getPath and thus project file de-dupe.

This commit is contained in:
Thomas Wilburn 2014-01-12 00:43:02 -08:00
parent b10a83b64e
commit 6073cdefce
2 changed files with 3 additions and 2 deletions

View file

@ -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;

View file

@ -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;