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