Another Travis isDir workaround

This commit is contained in:
Dan Stillman 2016-11-28 16:16:54 -05:00
parent a735d5dd41
commit 66f6ce715b

View file

@ -203,6 +203,11 @@ Zotero.Profile = {
yield Zotero.File.iterateDirectory(profilesDir, function* (iterator) { yield Zotero.File.iterateDirectory(profilesDir, function* (iterator) {
while (true) { while (true) {
let entry = yield iterator.next(); 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")))) { if (entry.isDir && (yield OS.File.exists(OS.Path.join(entry.path, "prefs.js")))) {
dirs.push(entry.path); dirs.push(entry.path);
} }