Skip to content
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

Unable to navigate higher than root directory of internal storage #75

Open
noel105 opened this issue Dec 24, 2015 · 3 comments
Open

Unable to navigate higher than root directory of internal storage #75

noel105 opened this issue Dec 24, 2015 · 3 comments

Comments

@noel105
Copy link

noel105 commented Dec 24, 2015

This issue exists on my Moto X Play running Android 6.0, specifically in the Snapprefs xposed module (http://forum.xda-developers.com/xposed/modules/app-snapprefs-ultimate-snapchat-utility-t2947254).

Clicking the "up" button while at the internal storage root directory does not advance any further up. I was attempting to access a folder on the SD card. Other apps have no issue reading, writing, or accessing the SD card, so I doubt the problem relates to read/write permissions.

The developer (MaaarZ) said he cannot fix it as the library isn't written by him and suggested I ask you.

Any help would be appreciated, thanks.

@passy
Copy link
Owner

passy commented Dec 24, 2015

Just from the description I don't know why that would happen. This is the corresponding code, which is fairly defensive:

mBtnNavUp.setOnClickListener(new OnClickListener() {
@Override
public void onClick(final View v) {
final File parent;
if (mSelectedDir != null
&& (parent = mSelectedDir.getParentFile()) != null) {
changeDirectory(parent);
}
}
});

I don't know why there wouldn't be a selected directory, so it's most likely that there is no parent available for the caller. I guess the developer of that extension would have to jump into the debugger to figure this one out.

@noel105
Copy link
Author

noel105 commented Dec 24, 2015

Thanks, I'll let him know.

apacha added a commit to apacha/Android-DirectoryChooser that referenced this issue Feb 12, 2017
@LoliDeveloper
Copy link

Worked for me:
When you use builder, add
builder.initialDirectory(android.os.Environment.getRootDirectory().toString());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants