Can’t directly change only case on filename
-
In version 3.10.0, regardless of the setting of settings option, “Convert post name to lowercase”, only changing the case on a filename now fails with the error:
“A file with that name already exists in the containing folder!”
Prior to this version, changing only the case of the filename would succeed, with WP adding a “-1” suffix to resolve the initial name conflict. This allowed a second renaming to remove the “-1” suffix.
Now the user has to, say, add a suffix and change the case, then rename again to remove the suffix. While this works, it is less intuitive. If it is necessary to leave this behavior, the process of changing the case in two steps should be documented in the docs or the error message..
Alternatively, to be consistent with the behavior of WP, if the plugin needs to resolve the naming conflict itself, the it should behave the same as WP and add a “-1” (actually “-n”).
If the error needs to remain, possibly changing the message would be helpful for the instance where the filename only differs by case.
“A file with a name that only differs by case already exists in the containing folder.”
You could also add: “Make the filename unique while changing the case by, for example, adding a suffix, and then rename again to remove the suffix.”
- The topic ‘Can’t directly change only case on filename’ is closed to new replies.