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
This commit is contained in:
Dan Stillman 2016-06-24 18:15:32 -04:00
parent b1e98929fa
commit 12fef05e18

View file

@ -124,7 +124,10 @@ describe("Zotero.Sync.Storage.Local", function () {
yield Zotero.File.putContentsAsync(OS.Path.join(subDir, file3Name), file3Contents); yield Zotero.File.putContentsAsync(OS.Path.join(subDir, file3Name), file3Contents);
yield Zotero.File.zipDirectory(zipDir, zipFile); 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* () { it("should download and extract a ZIP file into the attachment directory", function* () {