REPRODUCIBILITY (% or how often): Always
BUILD ID = OS VERSION (Settings > About product): 18.104.22.168
HARDWARE (XA2, X10, X10 II, …): Sony Xperia XA2 single SIM
UI LANGUAGE: English
REGRESSION: (compared to previous public release: Yes, No, ?): I guess not.
Every file that can’t be read by Documents App, due to being placed into a folder not allowed by its Firejail permissions (e.g. the Home directory), shouldn’t be indexed and shown. But it is.
- Take a random PDF file and made copies it to three folders: a) ~/Documents; b) ~ and c) /tmp. Rename them for easy identifying (e.g. fooDOC.pdf, fooHOME.pdf and fooTMP.pdf).
- Open Documents app. Wait until it has finished indexing new files.
- Try to open those three files:
3.1) /tmp is not indexed and therefore, /tmp/.pdf are not shown on Documents. On top of that, /tmp is not included among the folders allowed by Firejail to this app, so it wouldn’t open. This is the expected behavior.
3.2) All PDFs located into ~/Documents are indexed, shown and can be read. Expected behavior, too.
3.3) But ~/.pdf files are also indexed and are shown in Documents. Since its Firejail permissions don’t allow any file placed in the Home directory to be read, Documents returns an odd error (“Broken file. Cannot read the PDF document”).
~/foo.pdf or any other file which can’t be opened due to Firejail permissions shouldn’t be indexed and shown in Documents app.
And a minor issue: “Broken file” is a very confusing error message. It can lead to actually think the file is corrupt, which probably is not. It would be better something like “Can’t read the PDF document due to lack of permissions. Please move it into the recommended folder” (and a “Do you want me to do that? [Move] [Cancel]” would be absolutely great).