PR #143 improvements

Drop bad NullPointerException catching code
This commit is contained in:
EXL 2017-06-23 18:45:57 +07:00 committed by Alibek Omarov
parent c1da6335e4
commit 0949e89c11

View file

@ -81,11 +81,11 @@ public class FPicker extends Activity {
while( dirs == null ) while( dirs == null )
{ {
try { String parent = folder.getParent();
folder = new File(folder.getParent()); if (parent != null)
} catch (NullPointerException e) { folder = new File(parent);
else
folder = new File(Environment.getExternalStorageDirectory().toString()); folder = new File(Environment.getExternalStorageDirectory().toString());
}
dirs = folder.listFiles(); dirs = folder.listFiles();
} }