mirror of
https://github.com/godotengine/godot.git
synced 2025-04-13 01:00:35 +08:00
Fixing folder/file case sensitive renaming issue
Example: Could not rename "Objects" to "objects" or vice versa (cherry picked from commit e790ca084d1e1be54421c4fe0cb4aea955c62eb9)
This commit is contained in:
parent
b7faa76485
commit
000caef623
@ -957,7 +957,12 @@ void FileSystemDock::_rename_operation_confirm() {
|
||||
|
||||
//Present a more user friendly warning for name conflict
|
||||
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||
#if defined(WINDOWS_ENABLED) || defined(UWP_ENABLED)
|
||||
// Workaround case insensitivity on Windows
|
||||
if ((da->file_exists(new_path) || da->dir_exists(new_path)) && new_path.to_lower() != old_path.to_lower()) {
|
||||
#else
|
||||
if (da->file_exists(new_path) || da->dir_exists(new_path)) {
|
||||
#endif
|
||||
EditorNode::get_singleton()->show_warning(TTR("A file or folder with this name already exists."));
|
||||
memdelete(da);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user