Fix reporting email for images scanned via Intent (#163)

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/.
This commit is contained in:
Philipp Hasper
2026-04-21 09:27:23 +02:00
committed by GitHub
parent e70f4e4d1e
commit 8b80ca12b2

View File

@@ -10,4 +10,8 @@
<files-path
name="sources"
path="sources/" />
<!-- source images, when scanning via Intent (to send the last captured image) -->
<cache-path
name="session_sources"
path="sessions/" />
</paths>