diff options
| author | Stephen Traskal | 2018-01-21 21:04:16 -0500 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-02-19 22:47:39 +0100 |
| commit | 000caef6230b809ea2f0dd775abe819ecbca4997 (patch) | |
| tree | 7a9cd55ff2aec6ae0e50cc99205ced4b0019a621 | |
| parent | b7faa76485be1cfe368d24e4fe30adf252beedbe (diff) | |
| download | godot-000caef6230b809ea2f0dd775abe819ecbca4997.tar.gz godot-000caef6230b809ea2f0dd775abe819ecbca4997.tar.zst godot-000caef6230b809ea2f0dd775abe819ecbca4997.zip | |
Fixing folder/file case sensitive renaming issue
Example:
Could not rename "Objects" to "objects" or vice versa
(cherry picked from commit e790ca084d1e1be54421c4fe0cb4aea955c62eb9)
Diffstat (limited to '')
| -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 9804d1d9a..4ac8311e7 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; |
