Commit a2ec1307 authored by Geoffrey Métais's avatar Geoffrey Métais
Browse files

Handle file creation/deletion failure

CID #1297088
parent dcc70bc1
......@@ -429,13 +429,13 @@ public abstract class BaseBrowserFragment extends MediaBrowserFragment implement
return true;
case R.id.directory_view_hide_media:
try {
new File(mw.getLocation()+"/.nomedia").createNewFile();
updateLib();
if (new File(mw.getLocation()+"/.nomedia").createNewFile())
updateLib();
} catch (IOException e) {}
return true;
case R.id.directory_view_show_media:
new File(mw.getLocation()+"/.nomedia").delete();
updateLib();
if (new File(mw.getLocation()+"/.nomedia").delete())
updateLib();
return true;
}
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment