Checklist
Affected app version
1.13.1
Affected Android/Custom ROM version
Android 16
Affected device model
Pixel 7a
How did you install the app?
Built from source
Steps to reproduce the bug
- Using Filemanager (documentsui) open a jpg image
- Chose Fossify Gallery to open it => image opens
- Click "pencil" icon => crop grid shows over picture (first time you may need to confirm that you do indeed want to continue using Fossify Gallery for editing)
- make crop icon smaller than picture
- click top right menu (three dots)
- Chose "Overwrite original"
Expected behavior
it should save the file
Actual behavior
A FileNotFound Exception is thrown with a mangled document URI.
It tries to save to /content:/com.termux.documents/document/%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome%2F00-test%2FPXL_20260212_073020027.jpg
instead of content://com.termux.documents/document/%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome%2F00-test%2FPXL_20260212_073020027.jpg
(i.e. one of the slashes after content: move to the front of the string)
Screenshots/Screen recordings
No response
Additional information
- Problem is not related to particular photo, but rather to its document uri (file name)
- Software has no logs at place where this happens
- Device is indeed rooted (but that's unrelated to this issue)
- Never (knowingly) had animations
- No rabbits, cats or other pets
Got it working (sorta...) by replacing the getFileOutputStream(fileDirItem, true) { block in EditActivity.saveBitmapToPath() with the following code:
val path2 = path.replace("^/content:/".toRegex(), "content://")
val outStream = contentResolver.openOutputStream(path2.toUri())
saveBitmapToFile(file, bitmap, it, showSavingToast)
Checklist
Affected app version
1.13.1
Affected Android/Custom ROM version
Android 16
Affected device model
Pixel 7a
How did you install the app?
Built from source
Steps to reproduce the bug
Expected behavior
it should save the file
Actual behavior
A FileNotFound Exception is thrown with a mangled document URI.
It tries to save to /content:/com.termux.documents/document/%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome%2F00-test%2FPXL_20260212_073020027.jpg
instead of content://com.termux.documents/document/%2Fdata%2Fdata%2Fcom.termux%2Ffiles%2Fhome%2F00-test%2FPXL_20260212_073020027.jpg
(i.e. one of the slashes after content: move to the front of the string)
Screenshots/Screen recordings
No response
Additional information
Got it working (sorta...) by replacing the getFileOutputStream(fileDirItem, true) { block in EditActivity.saveBitmapToPath() with the following code:
val path2 = path.replace("^/content:/".toRegex(), "content://")
val outStream = contentResolver.openOutputStream(path2.toUri())
saveBitmapToFile(file, bitmap, it, showSavingToast)