Sanity-check OS.File.DirectoryIterator entry.isDir only on Travis

Follow up from 2c2a5a378
This commit is contained in:
Dan Stillman 2016-06-24 18:32:35 -04:00
parent 2d88b07855
commit edc996b1ed

View file

@ -734,7 +734,7 @@ Zotero.File = new function(){
iterator = new OS.File.DirectoryIterator(path);
yield iterator.forEach(Zotero.Promise.coroutine(function* (entry) {
// 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) {
if (Zotero.automatedTest && !entry.isDir && (yield OS.File.stat(entry.path)).isDir) {
Zotero.debug("Overriding isDir for " + entry.path);
entry.isDir = true;
}