sdcard0 is now sdcard on most current hardware

This was an attempt to circumvent read permission, but that can be
handled by the user simply choosing the directory correct.
This commit is contained in:
TwistedUmbrella 2017-05-19 02:22:16 -04:00
parent defd2d1941
commit 1dd951540a
1 changed files with 3 additions and 3 deletions

View File

@ -60,8 +60,8 @@ public class FileBrowser extends Fragment {
private SharedPreferences mPrefs;
private File sdcard = Environment.getExternalStorageDirectory();
private String home_directory = sdcard.getAbsolutePath().replace("emulated/0", "sdcard0");
private String game_directory = sdcard.getAbsolutePath().replace("emulated/0", "sdcard0");
private String home_directory = sdcard.getAbsolutePath();
private String game_directory = sdcard.getAbsolutePath();
@Override
public void onCreate(Bundle savedInstanceState) {
@ -286,7 +286,7 @@ public class FileBrowser extends Fragment {
if (images) {
navigate(new File(home_directory));
} else {
if (game_directory.equals(sdcard.getAbsolutePath().replace("emulated/0", "sdcard0"))) {
if (game_directory.equals(sdcard.getAbsolutePath())) {
HashSet<String> extStorage = FileBrowser.getExternalMounts();
if (extStorage != null && !extStorage.isEmpty()) {
for (Iterator<String> sd = extStorage.iterator(); sd.hasNext();) {