Merge pull request #94015 from Grublady/strip_slash

Ignore trailing slashes in new project’s path when disabling Create Folder
This commit is contained in:
Rémi Verschelde 2024-07-11 09:41:14 +02:00
commit cead80e7d0
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 0 deletions

View File

@ -315,6 +315,8 @@ void ProjectDialog::_create_dir_toggled(bool p_pressed) {
target_path = target_path.path_join(last_custom_target_dir); target_path = target_path.path_join(last_custom_target_dir);
} }
} else { } else {
// Strip any trailing slash.
target_path = target_path.rstrip("/\\");
// Save and remove target dir name. // Save and remove target dir name.
if (target_path.get_file() == auto_dir) { if (target_path.get_file() == auto_dir) {
last_custom_target_dir = ""; last_custom_target_dir = "";