From dc1d5dfa19e327412ab4dde53b56c4c26b19c971 Mon Sep 17 00:00:00 2001 From: Tobias Kaminsky Date: Thu, 24 Oct 2024 09:48:14 +0200 Subject: [PATCH] Update app/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.kt Co-authored-by: Tom <70907959+ZetaTom@users.noreply.github.com> Signed-off-by: Tobias Kaminsky Signed-off-by: tobiasKaminsky --- .../owncloud/android/ui/dialog/RenameFileDialogFragment.kt | 4 ++-- app/src/main/res/values/strings.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.kt index bdedacdc75..38c74ca57e 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/RenameFileDialogFragment.kt @@ -197,8 +197,8 @@ class RenameFileDialogFragment : DialogFragment(), DialogInterface.OnClickListen override fun afterTextChanged(s: Editable) = Unit private fun checkExtensionRenamed(newFileName: String): Boolean { - mTargetFile?.fileName?.let { - val previousExtension = File(it).extension + mTargetFile?.fileName?.let { previousFileName -> + val previousExtension = File(previousFileName).extension val newExtension = File(newFileName).extension return previousExtension != newExtension diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 83c91ed75f..60a5c33418 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1273,5 +1273,5 @@ Internal two way sync Disable for all folders Pending Remove Operation - Renaming extension might make the file unusable + Changing the extension might cause this file to open in a different application