do not scan folders recursively after renaming
This commit is contained in:
parent
dd436a5cb6
commit
60035f5f28
2 changed files with 3 additions and 3 deletions
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue