From d7ee6a9ef45bc1ce03b922c9fcdc712a37c818ee Mon Sep 17 00:00:00 2001 From: Mary Date: Tue, 7 May 2024 22:05:25 +0700 Subject: [PATCH] fix: always attempt to make directory --- src/state/gallery.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/state/gallery.ts b/src/state/gallery.ts index ef7dfc3278..feec267f53 100644 --- a/src/state/gallery.ts +++ b/src/state/gallery.ts @@ -240,6 +240,8 @@ export async function compressImage(img: ComposerImage): Promise { async function moveIfNecessary(from: string) { if (cacheDirectory && from.startsWith(cacheDirectory!)) { const to = joinPath(imageCacheDirectory!, uuid.v4() + '') + + await makeDirectoryAsync(imageCacheDirectory!, {intermediates: true}) await moveAsync({from, to}) return to