mirror of
https://github.com/jamessanford/kegs.git
synced 2024-09-27 08:54:33 +00:00
Allow startup when no external storage is available.
This commit is contained in:
parent
5a957ec8ad
commit
0914d4ea51
@ -48,7 +48,18 @@ class ConfigFile {
|
||||
}
|
||||
|
||||
public String[] getAllImageDirs() {
|
||||
String externalStorage = Environment.getExternalStorageDirectory().getPath();
|
||||
// Return an array of pathnames that may contain disk images.
|
||||
// The pathnames may not actually exist, that is OK.
|
||||
String externalStorage;
|
||||
|
||||
File externalDir = Environment.getExternalStorageDirectory();
|
||||
if (externalDir != null) {
|
||||
externalStorage = externalDir.getPath();
|
||||
} else {
|
||||
// Try harder. It is OK if this does not exist.
|
||||
externalStorage = "/mnt/sdcard";
|
||||
}
|
||||
|
||||
String[] dirs = {
|
||||
getImagePath(),
|
||||
externalStorage,
|
||||
|
Loading…
Reference in New Issue
Block a user