diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-06-30 11:00:51 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-06-30 11:00:51 +0200 |
commit | 52ce5b0f6999113a5c34c76af420b44ca85101d9 (patch) | |
tree | d32163c7eda4e3f4c5a91b55e2251f824bbcad80 /src/main/java/eu | |
parent | e21b394287d754eef0dae03a53c97c26c8d04887 (diff) |
add .nomedia to audios directory
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/persistance/FileBackend.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index e7b2b4571..619e12680 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -64,12 +64,20 @@ public class FileBackend { } private void createNoMedia() { - final File nomedia = new File(getConversationsFileDirectory()+".nomedia"); - if (!nomedia.exists()) { + final File nomedia_files = new File(getConversationsFileDirectory()+".nomedia"); + final File nomedia_audios = new File(getConversationsAudioDirectory()+".nomedia"); + if (!nomedia_files.exists()) { try { - nomedia.createNewFile(); + nomedia_files.createNewFile(); } catch (Exception e) { - Log.d(Config.LOGTAG, "could not create nomedia file"); + Log.d(Config.LOGTAG, "could not create nomedia file for files directory"); + } + } + if (!nomedia_audios.exists()) { + try { + nomedia_audios.createNewFile(); + } catch (Exception e) { + Log.d(Config.LOGTAG, "could not create nomedia file for audio directory"); } } } |