[Android] Handle file creation/deletion failure
Geoffrey Métais
git at videolan.org
Thu May 7 16:29:25 CEST 2015
vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu May 7 14:58:07 2015 +0200| [a2ec1307d5fa55ea961a53b45a6a16fb6eb25826] | committer: Geoffrey Métais
Handle file creation/deletion failure
CID #1297088
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a2ec1307d5fa55ea961a53b45a6a16fb6eb25826
---
.../src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
index 9419330..686f837 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/BaseBrowserFragment.java
@@ -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;
More information about the Android
mailing list