From 2c2a5a3787271c68435ca00137fe591b8ee83699 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 24 Jun 2016 16:50:08 -0400 Subject: [PATCH] Maybe fix zipDirectory() test failures on Travis --- chrome/content/zotero/xpcom/file.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 33e5b068d4..84c01ba8ee 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -733,8 +733,11 @@ Zotero.File = new function(){ try { iterator = new OS.File.DirectoryIterator(path); yield iterator.forEach(Zotero.Promise.coroutine(function* (entry) { - Zotero.debug(entry); - Zotero.debug((yield OS.File.stat(entry.path)).isDir); + // entry.isDir can be false for some reason on Travis, causing spurious test failures + if (Zotero.isLinux && !entry.isDir && (yield OS.File.stat(entry.path)).isDir) { + Zotero.debug("Overriding isDir for " + entry.path); + entry.isDir = true; + } if (entry.isSymLink) { Zotero.debug("Skipping symlink " + entry.name);