Add options
argument for Zotero.File.createDirectoryIfMissingAsync()
To allow passing 'from' argument through to OS.File.makeDir()
This commit is contained in:
parent
2a203afb20
commit
8c464a7a8b
2 changed files with 15 additions and 5 deletions
|
@ -293,6 +293,13 @@ describe("Zotero.File", function () {
|
|||
assert.ok(e);
|
||||
assert.match(e.message, /^Broken symlink/);
|
||||
});
|
||||
|
||||
it("should handle 'from' in options", async function () {
|
||||
var tmpPath = await getTempDirectory();
|
||||
var path = OS.Path.join(tmpPath, 'a', 'b');
|
||||
await Zotero.File.createDirectoryIfMissingAsync(path, { from: tmpPath });
|
||||
assert.isTrue(await OS.File.exists(path));
|
||||
});
|
||||
});
|
||||
|
||||
describe("#zipDirectory()", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue