Maybe fix zipDirectory() test failures on Travis

This commit is contained in:
Dan Stillman 2016-06-24 16:50:08 -04:00
parent ec212119cc
commit 2c2a5a3787

View file

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