android/CustomFilePickerFragment: don't go up beyond the External Storage Directory ...
/storage/emulated/0/
This commit is contained in:
parent
3edf1f8f18
commit
39a49aa78c
@ -2,6 +2,7 @@ package org.citra.citra_emu.fragments;
|
||||
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -93,6 +94,14 @@ public class CustomFilePickerFragment extends FilePickerFragment {
|
||||
return super.isCheckable(file) && !(mode == MODE_DIR && file.isFile());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void goUp() {
|
||||
if(Environment.getExternalStorageDirectory().getPath().equals(mCurrentPath.getPath())) {
|
||||
return;
|
||||
}
|
||||
goToDir(getParent(mCurrentPath));
|
||||
}
|
||||
|
||||
private static String fileExtension(@NonNull String filename) {
|
||||
int i = filename.lastIndexOf('.');
|
||||
return i < 0 ? "" : filename.substring(i + 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user