use renaming instead of Move only if both paths are on same storage
This commit is contained in:
parent
1de7985652
commit
119db82a16
|
@ -66,14 +66,16 @@ class CopyDialog(val activity: Activity, val files: List<File>, val path: String
|
||||||
CopyTask(copyListener, mContext).execute(pair)
|
CopyTask(copyListener, mContext).execute(pair)
|
||||||
dismiss()
|
dismiss()
|
||||||
} else {
|
} else {
|
||||||
for (f in files) {
|
if (Utils.isPathOnSD(context, view.source.value) && Utils.isPathOnSD(context, destinationPath)) {
|
||||||
val destination = File(destinationDir, f.name)
|
for (f in files) {
|
||||||
f.renameTo(destination)
|
val destination = File(destinationDir, f.name)
|
||||||
context.rescanItem(destination)
|
f.renameTo(destination)
|
||||||
}
|
context.rescanItem(destination)
|
||||||
|
}
|
||||||
|
|
||||||
dismiss()
|
dismiss()
|
||||||
listener.onSuccess()
|
listener.onSuccess()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue