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

Commit 60035f5f authored by tibbi's avatar tibbi
Browse files

do not scan folders recursively after renaming

parent dd436a5c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
        propMinSdkVersion = 16
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '4.0.5'
        propVersionName = '4.0.8'
        kotlin_version = '1.2.41'
        support_libs = '27.1.1'
    }
+2 −2
Original line number Diff line number Diff line
@@ -524,7 +524,7 @@ fun BaseSimpleActivity.renameFile(oldPath: String, newPath: String, callback: ((
                val uri = DocumentsContract.renameDocument(applicationContext.contentResolver, document.uri, newPath.getFilenameFromPath())
                if (document.uri != uri) {
                    updateInMediaStore(oldPath, newPath)
                    scanPaths(arrayListOf(oldPath, newPath)) {
                    rescanPaths(arrayListOf(oldPath, newPath)) {
                        if (!baseConfig.keepLastModified) {
                            updateLastModified(newPath, System.currentTimeMillis())
                        }
@@ -547,7 +547,7 @@ fun BaseSimpleActivity.renameFile(oldPath: String, newPath: String, callback: ((
    } else if (File(oldPath).renameTo(File(newPath))) {
        if (File(newPath).isDirectory) {
            deleteFromMediaStore(oldPath)
            scanPath(newPath) {
            rescanPaths(arrayListOf(newPath)) {
                runOnUiThread {
                    callback?.invoke(true)
                }