Merge pull request #15835 from bruvzg/disable_non_empty_folder_np

Disallow creating new projects in a non-empty folder.
This commit is contained in:
Rémi Verschelde 2018-01-18 14:27:45 +01:00 committed by GitHub
commit 3c5762303f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,10 +176,10 @@ private:
if (!is_empty) {
set_message(TTR("Your project will be created in a non empty folder (you might want to create a new folder)."), MESSAGE_WARNING);
set_message(TTR("Please choose an empty folder."), MESSAGE_ERROR);
memdelete(d);
get_ok()->set_disabled(false);
return valid_path;
get_ok()->set_disabled(true);
return "";
}
} else if (d->file_exists("project.godot")) {