Files
lnreader/android
Jeon JaeHyeong 34be7a1234 fix(native-file): prevent fatal crash when unlinking missing files (#1832)
fix(native-file): prevent crash when unlinking missing files

NativeFileSpec.unlink is codegened as a void-returning TurboModule
method, which dispatches asynchronously on the mqt_v_native thread.
Throwing "File does not exist" there bypasses every JS try/catch and
surfaces as a fatal AndroidRuntime exception, killing the process.

Make unlink idempotent (POSIX rm -f semantics): no-op when the path
does not exist. The Downloads "delete all" and individual delete
flows previously crashed whenever a chapter row had isDownloaded=true
while its on-disk folder had already been removed (e.g. after backup
restore or external cleanup). The same fix also protects useNovel,
pluginManager, fetch, epub/import, backup/local, backup/utils, and
AdvancedTab call sites that share the same native handler.
2026-05-24 10:41:17 +05:30
..
2026-04-05 21:39:52 +02:00
2026-04-05 21:39:52 +02:00
2026-04-05 21:39:52 +02:00