do not scan folders recursively after renaming

This commit is contained in:
tibbi 2018-05-13 13:21:41 +02:00
parent dd436a5cb6
commit 60035f5f28
2 changed files with 3 additions and 3 deletions

View file

@ -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'
}

View file

@ -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)
}