Skip to content

Commit 8b80ca1

Browse files
authored
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/.
1 parent e70f4e4 commit 8b80ca1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/src/main/res/xml/file_paths.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@
1010
<files-path
1111
name="sources"
1212
path="sources/" />
13+
<!-- source images, when scanning via Intent (to send the last captured image) -->
14+
<cache-path
15+
name="session_sources"
16+
path="sessions/" />
1317
</paths>

0 commit comments

Comments
 (0)