From c56427c6fbd3419b0c26294fa983dc9ab83f4470 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 13 Apr 2026 09:42:57 -0700 Subject: [PATCH] Fix inverted condition in moveIfNecessary (#10238) Co-authored-by: Claude Opus 4.6 (1M context) --- src/state/gallery.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/state/gallery.ts b/src/state/gallery.ts index 068e14fb28..c122ca6df4 100644 --- a/src/state/gallery.ts +++ b/src/state/gallery.ts @@ -277,7 +277,7 @@ export async function compressImage( async function moveIfNecessary(from: string) { const cacheDir = IS_NATIVE && getImageCacheDirectory() - if (cacheDir && from.startsWith(cacheDir)) { + if (cacheDir && !from.startsWith(cacheDir)) { const to = joinPath(cacheDir, nanoid(36)) await makeDirectoryAsync(cacheDir, {intermediates: true})