mirror of
https://github.com/FossifyOrg/File-Manager.git
synced 2026-03-02 21:48:28 -05:00
use renaming instead of Move only if both paths are on same storage
This commit is contained in:
@@ -66,14 +66,16 @@ class CopyDialog(val activity: Activity, val files: List<File>, val path: String
|
||||
CopyTask(copyListener, mContext).execute(pair)
|
||||
dismiss()
|
||||
} else {
|
||||
for (f in files) {
|
||||
val destination = File(destinationDir, f.name)
|
||||
f.renameTo(destination)
|
||||
context.rescanItem(destination)
|
||||
}
|
||||
if (Utils.isPathOnSD(context, view.source.value) && Utils.isPathOnSD(context, destinationPath)) {
|
||||
for (f in files) {
|
||||
val destination = File(destinationDir, f.name)
|
||||
f.renameTo(destination)
|
||||
context.rescanItem(destination)
|
||||
}
|
||||
|
||||
dismiss()
|
||||
listener.onSuccess()
|
||||
dismiss()
|
||||
listener.onSuccess()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user