aves
aves copied to clipboard
Can't delete image that is in a DCIM subfolder
Describe the bug Giving storage access for an image located inside a DCIM subfolder and grants access to "DCIM", resulting in a failed message upon pressing delete.
But doing the same for an image directly inside the DCIM folder grants access to a "dcim" folder and allows for successful deletion of media both in the DCIM folder and its subfolders.
The "DCIM" storage access entry (in Aves settings) doesn't seem correlate with the actual folder on the device (but the "dcim" entry does.)
To Reproduce Steps to reproduce the behavior:
- Have an image in DCIM/subfolder/image.jpg
- Press delete button.
- Give storage access to "DCIM" folder.
- See error message.
Subsequently
- Have an image in DCIM/image.jpg
- Press delete and grant access to "dcim" folder.
- No error and successful deletion.
Expected behavior Giving storage access for an image in a DCIM subfolder should grant access correctly.
Screenshots
System information and logs: Package: deckers.thibault.aves Installer: com.android.vending Aves version: 1.9.7-play, build 108 Flutter: stable 3.13.7 Android version: 13, API 33 Android build: TP1A.220624.014 release-keys Device: vivo I2011 Geocoder: ready Mobile services: ready System locales: en_US Storage volumes: /storage/emulated/0/, /storage/C0B5-9BF6/ Storage grants: /storage/emulated/0/Movies/, /storage/emulated/0/Pictures/, /storage/emulated/0/Documents/, /storage/emulated/0/DCIM/, /storage/emulated/0/dcim/ Error reporting: true
Additional context The above image was in DCIM/Screenshots.
I'll take a closer look at this later, but for now i have a quick question: i see in your grants that there is both "/storage/emulated/0/DCIM/" and "/storage/emulated/0/dcim/". How is that possible? Was the folder name at some point "DCIM", you gave permission for it, then deleted it and recreated it as "dcim"?
"DCIM" entry was created when I granted permission for an image located inside "/DCIM/Screenshots/". "dcim" was created when I granted permission for an image located directly inside "/DCIM/". I never renamed any folder. Aves apparently recognizes the folder differently based on where the image is.
I see. So the first weird thing is that the app should never have asked you for another permission when editing the image directly inside DCIM, as it already had the permission.
I've dealt with some file path casing issues before and it's tricky. I'll need to try and reproduce your situation on my device.
I've tried to reproduce the issue on my device, to no avail (and the logs did not yield anything useful).
Actually, I don't understand why Aves would ask/get permission as "dcim" if the directory name is indeed DCIM
in uppercase. All the rest is probably a consequence of this weirdness.
If you clear the grants for DCIM
and dcim
via Settings > Privacy > Storage access, then can you reproduce the bug at will by following the same sequence of actions you indicated in your reproduction scenario above?
Also, do you use a custom ROM?
No custom ROM, just FuntouchOS (vivo/iqoo ROM).
I have discovered a new behaviour with user-created directories in DCIM.
User-created directories in DCIM (and the DCIM folder itself) seem to use the "dcim" permission.
Directories created by the system (and by other apps) seem to use the "DCIM" permission. It's demonstrated in the linked video.
https://crepe.moe/kESinNul (you might want to download the video)
In the video, the "placeholder" folder was created by me, and "Screenshots" was created by the OS.
And yes, it is completely reproducable.
Thanks for digging further.
The first mystery to me is why the system file picker shows the directory as "dcim" while mixplorer shows it as "DCIM".
Android is technically case sensitive, but normally everything is made to present it to the user as case insensitive. What I mean is that it's possible for the system to have both "dcim" and "DCIM" folders side by side but typical file managers won't let you create this situation.
My guess is that on your system you indeed have both. Different apps will show the combined content from both in a single directory called either "DCIM" or "dcim", depending on the API used and how paths are resolved, as if there was a single directory.
This is a mess. I'm not even sure i can recreate this situation without FuntouchOS.
Related:
- https://github.com/deckerst/aves/commit/220342f9bc2e4a582297de3ba72a37394e73c684#diff-dc3d19eb69290bfcaa82fe03e728c2fe2f93b036c830542c8585f00782a9546bR35
"All File Access" would make the app redundant and useless. Drill down the issue and solving it would be the best way, and why we users take the time to post and report the issue.
What might help is different people reporting it. Or a work around.
It looks like if you save or move all images out of DCIM the problem should not apply. I dont know if the camera app I use has the ability to store taken photos into another folder, but I would do that if possible.
~~You're missing the point: that app is a fundamental system app. If your device doesn't have it, it's non standard.~~
Edit: oops, wrong thread!