From 45a8178fe0c4dd1bf20e05d3321f1a929efc8a60 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sun, 27 Nov 2016 20:00:10 -0500 Subject: [PATCH] Add another DirectoryIterator entry.isDir workaround for Travis --- chrome/content/zotero/xpcom/file.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 969d57ace3..c4e5b08758 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -544,6 +544,12 @@ Zotero.File = new function(){ let entry = yield iterator.next(); let dest = newDir + entry.path.substr(rootDir.length); + // 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; + } + // Move files in directory if (!entry.isDir) { try {