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); }