diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CopyDialog.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CopyDialog.kt index 76f3b78d..7b7de686 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CopyDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/dialogs/CopyDialog.kt @@ -49,6 +49,11 @@ class CopyDialog(val activity: Activity, val files: List, 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) diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 29906633..ec91357f 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -29,6 +29,7 @@ Ziel auswählen Konnte nicht an ausgewähltes Ziel schreiben Bitte wähle ein Ziel + Source and destination cannot be the same Konnte die Datei nicht kopieren Kopiere home diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 9cf8d514..6081f956 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -29,6 +29,7 @@ Seleziona destinazione Impossibile scrivere nella destinazione selezionata Seleziona una destinazione + Source and destination cannot be the same Impossibile copiare i file Copia in corso home diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 7daa815a..2018d526 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -29,6 +29,7 @@ 宛先を選択 選択した宛先に書き込みできませんでした 宛先を選択してください + Source and destination cannot be the same ファイルをコピーできませんでした コピー中 ホーム diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index f303efb9..f926f3f1 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -29,6 +29,7 @@ Selecionar destino Não foi possível escrever no destino selecionado Por favor selecione um destino + Source and destination cannot be the same Não foi possível copiar os ficheiros A copiar início diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 6296cd4d..ed01aa17 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -29,6 +29,7 @@ Välj mål Det gick inte att skriva till målet Please select a destination + Source and destination cannot be the same Kunde inte kopiera filen Kopierar home diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index a7615bde..6d3170f5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -29,6 +29,7 @@ Select destination Could not write to the selected destination Please select a destination + Source and destination cannot be the same Could not copy the files Copying home