Fix inverted condition in moveIfNecessary (#10238)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Samuel Newman
2026-04-13 09:42:57 -07:00
committed by GitHub
parent 9c502b38e5
commit c56427c6fb
+1 -1
View File
@@ -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})