on Android VfsFile#exists returns false even when VfsFile#readString successfully reads the file
- Dominant language
- Kotlin
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
In my app on Android VfsFile#exists returns false even when VfsFile#readString successfully reads the file
Maybe this is due to some hack with source sets on Android, but this inconsistency is a bug anyway.
Due to this issue I have to use try / catch FileNotFoundException instead of VfsFile#exists
Please see the commit: https://github.com/andstatus/game2048/commit/d8128bdc4585e3c870619334c3b2970d6f98f5b9
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the Android handling of VfsFile#exists and comparing it with the path used by VfsFile#readString. Use the linked game2048 commit as the reproduction context; done means exists reports true for a file that readString can successfully read, with a regression test covering the inconsistency.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100