Use default dir when Directory Chooser returns null/user clicks "Choose default dir"
This commit is contained in:
parent
b8f725c843
commit
15a1c3e9f8
|
@ -389,7 +389,12 @@ public class PreferenceController implements SharedPreferences.OnSharedPreferenc
|
|||
requestCode == DirectoryChooserActivity.RESULT_CODE_DIR_SELECTED) {
|
||||
String dir = data.getStringExtra(DirectoryChooserActivity.RESULT_SELECTED_DIR);
|
||||
|
||||
File path = new File(dir);
|
||||
File path;
|
||||
if(dir != null) {
|
||||
path = new File(dir);
|
||||
} else {
|
||||
path = ui.getActivity().getExternalFilesDir(null);
|
||||
}
|
||||
String message = null;
|
||||
final Context context= ui.getActivity().getApplicationContext();
|
||||
if(!path.exists()) {
|
||||
|
|
Loading…
Reference in New Issue