From 66f6ce715b085def17e90f39f55859b332472931 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 28 Nov 2016 16:16:54 -0500 Subject: [PATCH] Another Travis isDir workaround --- chrome/content/zotero/xpcom/profile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/content/zotero/xpcom/profile.js b/chrome/content/zotero/xpcom/profile.js index 713bffbc7..ba88e52e8 100644 --- a/chrome/content/zotero/xpcom/profile.js +++ b/chrome/content/zotero/xpcom/profile.js @@ -203,6 +203,11 @@ Zotero.Profile = { yield Zotero.File.iterateDirectory(profilesDir, function* (iterator) { while (true) { let entry = yield iterator.next(); + // entry.isDir can be false for some reason on Travis, causing spurious test failures + if (Zotero.automatedTest && !entry.isDir && (yield OS.File.stat(entry.path)).isDir) { + Zotero.debug("Overriding isDir for " + entry.path); + entry.isDir = true; + } if (entry.isDir && (yield OS.File.exists(OS.Path.join(entry.path, "prefs.js")))) { dirs.push(entry.path); }