diff options
author | Stephen Traskal <Straskal@gmail.com> | 2018-01-21 21:04:16 -0500 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-19 21:46:58 +0100 |
commit | e790ca084d1e1be54421c4fe0cb4aea955c62eb9 (patch) | |
tree | 89311bda83dd2a6588b5444bf3f5bc9de523f035 | |
parent | 43de4eb4d2f279ed20cd2f8340a4e33d92b55b56 (diff) |
Fixing folder/file case sensitive renaming issue
Example:
Could not rename "Objects" to "objects" or vice versa
-rw-r--r-- | editor/filesystem_dock.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index e26f4ba449..0be3bb86c7 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -958,7 +958,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; |