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

Commit 4cb79e4e authored by tibbi's avatar tibbi
Browse files

add an extra check to avoid deleting folders from mediastore

parent c6129a88
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -237,7 +237,7 @@ fun Context.getFileUri(path: String) = when {

// these functions update the mediastore instantly, MediaScannerConnection.scanFile takes some time to really get applied
fun Context.deleteFromMediaStore(path: String): Boolean {
    if (getDoesFilePathExist(path)) {
    if (getDoesFilePathExist(path) || getIsPathDirectory(path)) {
        return false
    }