Skip to content
This repository has been archived by the owner on Jul 23, 2022. It is now read-only.

Cannot go up to /emulated/0 #16

Closed
lucian-cm opened this issue May 23, 2018 · 2 comments
Closed

Cannot go up to /emulated/0 #16

lucian-cm opened this issue May 23, 2018 · 2 comments
Assignees

Comments

@lucian-cm
Copy link

I've noticed that going up function has changed when the following code was added in ChooserDialog.java. This causes the side effect that you cannot navigate up from that point onwards. Maybe the test should be (_currentDir.getParentFile() != null) && f.canRead() && (f.listFiles().length == 0). This happens on Android 6.
I think the code should be to allow up navigation until it is possible irrespective if you can show the items in that folder.

if (f.canRead()) {
_currentDir = f;
 } else {
 Toast.makeText(this._context, "Couldn't go up level", Toast.LENGTH_SHORT).show();
}
@hedzr
Copy link
Owner

hedzr commented May 23, 2018

i'll test that case later, thanks your points

@hedzr hedzr self-assigned this May 24, 2018
@hedzr
Copy link
Owner

hedzr commented May 24, 2018

f != null should be added, you're right. f.listFiles().length could be ignored, in my sight.

hedzr added a commit that referenced this issue May 24, 2018
…ng the default logic for going up level, and fixed the nullable condition.
hedzr added a commit that referenced this issue Oct 8, 2018
…ng the default logic for going up level, and fixed the nullable condition.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants