mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-06-05 22:09:15 +02:00
do not allow copying items in themselves
This commit is contained in:
@ -49,6 +49,11 @@ class CopyDialog(val activity: Activity, val files: List<File>, val path: String
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
if (view.source.text.trimEnd('/') == destinationPath.trimEnd('/')) {
|
||||
context.toast(R.string.source_and_destination_same)
|
||||
return@setOnClickListener
|
||||
}
|
||||
|
||||
val destinationDir = File(destinationPath)
|
||||
if (!destinationDir.exists()) {
|
||||
context.toast(R.string.invalid_destination)
|
||||
|
Reference in New Issue
Block a user