Skip to content

Claude/fix readonly filesystem error 011ni1r yzm rw ha fm rj sccc d8#129

Merged
hb0 merged 1 commit intomainfrom
claude/fix-readonly-filesystem-error-011ni1rYZMRwHaFmRjScccD8
Dec 8, 2025
Merged

Claude/fix readonly filesystem error 011ni1r yzm rw ha fm rj sccc d8#129
hb0 merged 1 commit intomainfrom
claude/fix-readonly-filesystem-error-011ni1rYZMRwHaFmRjScccD8

Conversation

@hb0
Copy link
Contributor

@hb0 hb0 commented Dec 8, 2025

No description provided.

@hb0 hb0 self-assigned this Dec 8, 2025
Fixed IllegalStateException when getExternalFilesDir() returns null due to
external storage being unmounted or unavailable.

Changes:
- Removed error() call that crashed the app
- Added fallback to context.filesDir when external storage is unavailable
- Added logging to show where the model file is being saved
- Graceful degradation: app continues to work using internal storage

Root Cause:
getExternalFilesDir() can legitimately return null when external storage is
not mounted, in safe mode, or during device initialization. The previous code
crashed instead of handling this scenario.

Fix:
Use Elvis operator to fall back to internal storage, ensuring the app always
has a valid directory to save the model file.
@hb0 hb0 force-pushed the claude/fix-readonly-filesystem-error-011ni1rYZMRwHaFmRjScccD8 branch from 43d9cf2 to c3c1fee Compare December 8, 2025 09:46
@hb0 hb0 merged commit 20fdecd into main Dec 8, 2025
3 checks passed
@hb0 hb0 deleted the claude/fix-readonly-filesystem-error-011ni1rYZMRwHaFmRjScccD8 branch December 8, 2025 09:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant