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