Fix reporting email for images scanned via Intent#163
Merged
pynicolas merged 1 commit intopynicolas:mainfrom Apr 21, 2026
Merged
Fix reporting email for images scanned via Intent#163pynicolas merged 1 commit intopynicolas:mainfrom
pynicolas merged 1 commit intopynicolas:mainfrom
Conversation
pynicolas
requested changes
Apr 20, 2026
Owner
pynicolas
left a comment
There was a problem hiding this comment.
Thanks a lot for this PR!
I completely missed this bug.
One thing needs to be changed to fix the bug. Either I handle it on my side or you update this PR: tell me what you prefer.
| name="sources" | ||
| path="sources/" /> | ||
| <!-- source images, when scanning via Intent (to send the last captured image) --> | ||
| <files-path |
Owner
There was a problem hiding this comment.
It should be cache-path instead of files-path because sessions are stored in the app cache folder, see https://github.com/pynicolas/FairScan/blob/v1.19.0/app/src/main/java/org/fairscan/app/FairScanApp.kt#L91
Contributor
Author
There was a problem hiding this comment.
@pynicolas huh... that's weird. Because, yes of course it is cache-path. Seems to be a commit error caused by switching machines in-between. I pushed the fixed version just now.
When starting the app via "org.fairscan.app.action.SCAN_TO_PDF" and then reporting the last image via createEmailWithImageIntent() the URI creation failed with > java.lang.IllegalArgumentException: Failed to find configured root that > contains /data/data/org.fairscan.app/cache/sessions/097d29ab-f706-4ba2-848a-fea16fb5f41f/sources/1776590719661.jpg The issue was that when launched via SCAN_TO_PDF, images are stored under the cache directory (cache/sessions/<uuid>/sources/), but the FileProvider configuration in file_paths.xml only had a <cache-path> for pdfs/ and <files-path> for sources/. There was no cache path covering sessions/.
408c732 to
342d601
Compare
Owner
|
Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When starting the app via "org.fairscan.app.action.SCAN_TO_PDF" and then reporting the last image via createEmailWithImageIntent() the URI creation failed with
The issue was that when launched via SCAN_TO_PDF, images are stored under the cache directory (cache/sessions//sources/), but the FileProvider configuration in file_paths.xml only had a for pdfs/ and for sources/. There was no cache path covering sessions/.