fixed a problem where a directory already existed
This commit is contained in:
parent
2130778667
commit
bf83e1cf0b
2 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@fogtype/gadl",
|
"name": "@fogtype/gadl",
|
||||||
"version": "1.4.1",
|
"version": "1.4.2",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": "bin/run.js",
|
"bin": "bin/run.js",
|
||||||
|
|
|
@ -43,7 +43,7 @@ export function createPlatform(opts: {
|
||||||
...platform,
|
...platform,
|
||||||
|
|
||||||
async download(dir: string, book: Book): Promise<void> {
|
async download(dir: string, book: Book): Promise<void> {
|
||||||
await fs.mkdir(dir);
|
await fs.mkdir(dir, { recursive: true });
|
||||||
|
|
||||||
const files: Array<() => Promise<Blob>> = await platform.getFiles(book);
|
const files: Array<() => Promise<Blob>> = await platform.getFiles(book);
|
||||||
const digits = String(files.length).length;
|
const digits = String(files.length).length;
|
||||||
|
|
Loading…
Add table
Reference in a new issue