From 000caef6230b809ea2f0dd775abe819ecbca4997 Mon Sep 17 00:00:00 2001 From: Stephen Traskal Date: Sun, 21 Jan 2018 21:04:16 -0500 Subject: [PATCH] Fixing folder/file case sensitive renaming issue Example: Could not rename "Objects" to "objects" or vice versa (cherry picked from commit e790ca084d1e1be54421c4fe0cb4aea955c62eb9) --- editor/filesystem_dock.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 9804d1d9a31..4ac8311e7fa 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -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;