fix ios image cropping
Bumps @bsky.app/expo-image-crop-tool to 0.5.1, which writes cropped images into the caches directory instead of NSTemporaryDirectory. The old temp dir was not on expo-file-system's scoped-write allowlist, so moveAsync failed with "File '…/tmp/…/..' is not writable" — leaving the composer silently showing the original uncropped image. Also logs non-cancellation crop errors via logger.error so future failures in this path surface instead of silently falling back to the original image. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -98,7 +98,7 @@
|
|||||||
"@braintree/sanitize-url": "^6.0.2",
|
"@braintree/sanitize-url": "^6.0.2",
|
||||||
"@bsky.app/alf": "^0.1.9",
|
"@bsky.app/alf": "^0.1.9",
|
||||||
"@bsky.app/expo-guess-language": "^0.2.8",
|
"@bsky.app/expo-guess-language": "^0.2.8",
|
||||||
"@bsky.app/expo-image-crop-tool": "^0.5.0",
|
"@bsky.app/expo-image-crop-tool": "^0.5.1",
|
||||||
"@bsky.app/expo-scroll-edge-effect": "^0.1.4",
|
"@bsky.app/expo-scroll-edge-effect": "^0.1.4",
|
||||||
"@bsky.app/expo-translate-text": "^0.2.9",
|
"@bsky.app/expo-translate-text": "^0.2.9",
|
||||||
"@bsky.app/react-native-mmkv": "2.12.5",
|
"@bsky.app/react-native-mmkv": "2.12.5",
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import {openCropper} from '#/lib/media/picker'
|
|||||||
import {type PickerImage} from '#/lib/media/picker.shared'
|
import {type PickerImage} from '#/lib/media/picker.shared'
|
||||||
import {getDataUriSize} from '#/lib/media/util'
|
import {getDataUriSize} from '#/lib/media/util'
|
||||||
import {isCancelledError} from '#/lib/strings/errors'
|
import {isCancelledError} from '#/lib/strings/errors'
|
||||||
|
import {logger} from '#/logger'
|
||||||
import {IS_NATIVE, IS_WEB} from '#/env'
|
import {IS_NATIVE, IS_WEB} from '#/env'
|
||||||
|
|
||||||
export type ImageTransformation = {
|
export type ImageTransformation = {
|
||||||
@@ -149,6 +150,7 @@ export async function cropImage(img: ComposerImage): Promise<ComposerImage> {
|
|||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (!isCancelledError(e)) {
|
if (!isCancelledError(e)) {
|
||||||
|
logger.error('Failed to crop image', {safeMessage: e})
|
||||||
return img
|
return img
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user