Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce52d1ff authored by Gil Dobjanschi's avatar Gil Dobjanschi
Browse files

Hide project media by creating the .nomedia file

Change-Id: I4ef1f16ceaa211b7f614cb3dfffa5beb4ae3e8de
parent e743bd2b
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -63,6 +63,12 @@ public class VideoEditorFactory {
        if (!dir.exists()) {
        if (!dir.exists()) {
            if (!dir.mkdirs()) {
            if (!dir.mkdirs()) {
                throw new FileNotFoundException("Cannot create project path: " + projectPath);
                throw new FileNotFoundException("Cannot create project path: " + projectPath);
            } else {
                // Create the file which hides the media files
                // from the media scanner
                if (!new File(dir, ".nomedia").createNewFile()) {
                    throw new FileNotFoundException("Cannot create file .nomedia");
                }
            }
            }
        }
        }