Skip to content

File picker forces permission for parent folder when selecting nested folder #211

Description

@kaoneko

Checklist

  • I can reproduce the bug with the latest versions.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs), in the README and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report may get dismissed otherwise.
  • This issue contains only one bug.

Affected Android/Custom ROM version

Android 13 / LineageOS 20

Affected device model

Pixel 4a

How did you install the apps?

F-Droid / IzzyOnDroid

Which apps are affected?

Calendar, Contacts, Notes, possibly others

Steps to reproduce the bug

  1. Open e.g. Notes and then its Settings and scroll all the way down
  2. Tap Enable automatic backups
  3. Tap the Folder field and pick a folder that's not a direct child of Internal, e.g. Internal > Backups > Notes
  4. A screen titled Confirm folder access pops up saying

    Please allow accessing 'Internal/Backups' on the next screen by pressing 'Use this folder' at the bottom.

  5. After tapping OK the Android file picker opens at said location. A security-minded user will navigate to the folder they actually want to grant access to and tap USE THIS FOLDER followed by ALLOW
  6. The user is returned to the Fossify folder picker, while a toast shows up saying Wrong folder selected, please select path 'Internal/Backups'

Expected behavior

I always feel a bit silly answering these two questions, since it should be clear by now, so I'll let ChatGPT answer them.

  • The user should be able to select a backup location that is not a direct child of Internal without being coerced into granting permission to its parent or ancestor folder.
  • After selecting the desired folder in the Android file picker and confirming the selection, the Fossify app should acknowledge the chosen folder as the backup location without any errors.

Actual behavior

  • When selecting a backup location that is not a direct child of Internal, the user is prompted to grant permission to its parent or ancestor folder (Internal/Backups in this case) instead of the intended folder.
  • Even after the user selects the correct folder and grants permission, an error message appears stating that the wrong folder was selected, instructing the user to choose the path Internal/Backups, which is not the folder the user intended to select.

Screenshots/Screen recordings

The behavior was coincidentally showcased in the video in #131, where the user actually goes along with granting the Fossify app wider access. He then remarks under Expected behavior:

Also, in step 9, I expect to give Fossify Contacts/Calendar access only to the backup directory (Internal > Backups > Contacts in my case), not to its parent.

Although this was not the main point of the feature request (it was also not a bug report).

Additional information

If you pick e.g. Internal > Backups > Local > Fossify > Notes, you will also be asked to grant access to Internal/Backups, hence me also mentioning ancestors in addition to parents.

Possibly related:

Activity

  1. added
    bugSomething is not working
    needs triageIssue is not yet ready for PR authors to take up
    on May 17, 2024
  2. changed the title [-]When selecting a backup location which is not a direct child of Internal, the user is coerced into granting permission to its parent or ancestor instead[/-] [+]When selecting a backup location which is not a direct child of Internal, the user is coerced into granting access to its parent or ancestor instead[/+] on May 17, 2024
  3. removed
    needs triageIssue is not yet ready for PR authors to take up
    on Oct 9, 2024
  4. jfsanchez commented on Oct 9, 2024

    @jfsanchez

    I think that this related bug is missing from here: [https://github.com/FossifyOrg/Contacts/issues/144]. If a consistent file selection with just an intent is possible, then it would solve many other problems with: GrapheneOS, Fariphone, etc.

  5. guri87-byte commented on Jan 25, 2025

    @guri87-byte

    Any workaround on the issue?
    I need automatic backups to use fossify apps.

    Open source Tasks app does the thing, maybe copy the solution?

  6. naveensingh commented on Jan 25, 2025

    @naveensingh
    Member

    the user is coerced into granting access to its parent or ancestor instead

    It seems to me that this was done to handle the following not-so-valid edge-cases:

    • Having access to Internal > Backups instead of Internal > Backups > Notes allows the app to create the Notes folder if it is missing (system/user error). The app still saves files to Internal > Backups > Notes, not Internal > Backups.
    • Slightly reduces the number of dialogs one has to go through to select another folder in the same parent (see Improve file/folder selection UX #131)

    copy the solution?

    It rarely is as simple as that. The solution is always more or less obvious, implementation requires consideration and time.

  7. kaoneko commented on Jan 25, 2025

    @kaoneko
    Author

    For clarity, do note that this issue also applies to selecting a backup folder further down the directory hierarchy; if you pick e.g. Internal > Backups > Local > Fossify > Notes, you will also be asked to grant access to Internal/Backups and all files and folders below it, giving the Fossify app access to all kinds of sensitive backup data that you don't want the Fossify app to have access to (i.e. be able to wipe), no matter if it has internet access or not.

  8. self-assigned this
    on Feb 16, 2025
  9. changed the title [-]When selecting a backup location which is not a direct child of Internal, the user is coerced into granting access to its parent or ancestor instead[/-] [+]File picker forces permission for parent folder when selecting nested folder[/+] on Apr 2, 2025
  10. masterbeancoder commented on Sep 4, 2025

    @masterbeancoder

    Well, I've figured out a temporary workaround for choosing the correct directory on GrapheneOS (as long as it's on internal storage at least). Here's what I did:

    1. Temporarily rename Backups folder. (I went with Backupss)
    2. Enable automatic backups in fossify app.
    3. Tap the folder field and tap Internal
    4. Tap the + to add a folder. Now you can add Backups as a child of Internal
    5. If you want the backup in a directory within your Backups folder ie: Internal > Backups > Calendar, just tap the folder field again and you should be able to add a new folder within the one you just created.
    6. Once you've set up your folder(s) and the backups have been enabled, you can now copy everything in your Backupss folder back to the actual Backups folder and delete the Backupss folder.
  11. kaoneko commented on Sep 4, 2025

    @kaoneko
    Author

    @dcikpeama You still had to grant the Fossify app permission to access Backups after step 4, right? I don't understand how this is a workaround to the issue we're discussing here.

  12. masterbeancoder commented on Sep 4, 2025

    @masterbeancoder

    @dcikpeama You still had to grant the Fossify app permission to access Backups after step 4, right? I don't understand how this is a workaround to the issue we're discussing here.

    It seems I must have misunderstood what was being discussed since I initially came to this thread because this issue was closed in favor of the current thread. I was addressing what seems to be the related problem of GrapheneOS not presenting a directory tree to local storage (one of the problems alluded to here). Apologies if this is the wrong thread for my previous post.

  13. Opening-Button-8988 commented on Sep 27, 2026

    @Opening-Button-8988

    I have this issue, app v1.11.0 from F-droid using GrapheneOS build 2026091900. Would be lovely if this could be fixed. I want to centralize my app backups location and it's a little annoying having this one exception out in /Downloads/ for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething is not working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions