commit 12fef05e18e98bcd0a5a91d33bfcf233324351d1
parent b1e98929fae4a4684afd2d0f7301ad1cfbe7e5c9
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 24 Jun 2016 18:15:32 -0400
Fix processDownload test failure on Travis
OS.File.DirectoryIterator, used by OS.File.removeDir(), isn't reliable
on Travis, returning entry.isDir == false for directories, so use
nsIFile instead
See also: 2c2a5a378
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/test/tests/storageLocalTest.js b/test/tests/storageLocalTest.js
@@ -124,7 +124,10 @@ describe("Zotero.Sync.Storage.Local", function () {
yield Zotero.File.putContentsAsync(OS.Path.join(subDir, file3Name), file3Contents);
yield Zotero.File.zipDirectory(zipDir, zipFile);
- yield OS.File.removeDir(zipDir);
+ // OS.File.DirectoryIterator, used by OS.File.removeDir(), isn't reliable on Travis,
+ // returning entry.isDir == false for directories, so use nsIFile instead
+ //yield OS.File.removeDir(zipDir);
+ Zotero.File.pathToFile(zipDir).remove(true);
});
it("should download and extract a ZIP file into the attachment directory", function* () {