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 )
{
try {
folder = new File(folder.getParent());
} catch (NullPointerException e) {
String parent = folder.getParent();
if (parent != null)
folder = new File(parent);
else
folder = new File(Environment.getExternalStorageDirectory().toString());
}
dirs = folder.listFiles();
}