From 9fad602a5ad25c7dc1b6d958fcf28e0cd053c5d8 Mon Sep 17 00:00:00 2001 From: Rafa Mel Date: Wed, 1 May 2019 07:09:18 +0200 Subject: [PATCH] fix(public/fs): fixes rw fs.ensureDir call --- src/public/fs/rw.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/public/fs/rw.ts b/src/public/fs/rw.ts index 3871252..c14d73c 100644 --- a/src/public/fs/rw.ts +++ b/src/public/fs/rw.ts @@ -42,7 +42,7 @@ function rw( if (!(await confirm(`Write "${relative}"?`, options))) return; - await fs.ensureDir(file).catch(rejects); + await fs.ensureDir(path.parse(file).dir).catch(rejects); await fs.writeFile(file, String(response)).catch(rejects); logger.info(`Written: ${relative}`); };