New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add directory related functions to AndroidAssetReader
#11495
base: main
Are you sure you want to change the base?
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
Co-authored-by: Kanabenki <lucien.menassol@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@esensar seems like I can't resolve the remaining threads from my previous review for some reason, but you should be able to.
Co-authored-by: François Mockers <francois.mockers@vleue.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't tested it myself but given the constraints the code seems reasonable.
Objective
Solution
is_directory
, uses result of open, which will fail for directories. I tried using the result ofopen_dir
for this, but it was successful for files too, which made loading folders return empty lists, sinceopen_dir
was successful and treated all files as empty directories.meta
files was copied from filesystem implementationChangelog
Notes
I noticed late that there was the #9968 issue (I only noticed #9591), so I have also missed that a PR was already open (#9969). Feel free to copy over the fixes from this one over there.
The only difference I notice between these 2, is that I have used
open
instead ofopen_dir
foris_directory
implementation. I have tried withopen_dir
too, but unfortunately that didn't work. I tested this on an actual device, using the mobile example, by making some minor changes: