You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create a new project in Godot, if I leave the "Project Name" field empty and uncheck the "Create Folder" option, then check it again and attempt to enter a project name, I encounter the following errors:
"You cannot save a project at the selected path." (if saving in Documents)
"The selected path is not empty." (if saving in any other folder)
Steps to reproduce
Open Godot.
Click on "Create"
Leave the "Project Name" field empty.
Uncheck the "Create Folder" option.
Check the "Create Folder" option again.
Enter a project name.
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered:
I followed the steps above to try and replicate it on MacOS (Godot v4.3.stable - macOS 13.1.0 - Vulkan (Forward+) - integrated Apple M2 - Apple M2 (8 Threads)).
While I did get the first error "You cannot save a project at the selected path. Please create a subfolder or choose a new path." after following the steps, the warning did not appear when I used the "Browse" button and selected another folder. Instead, it behaved normally and showed "The project folder will be automatically created". The warning the selected path is not empty only occurred when I left the "Create Folder" option unchecked.
With regard to why the error occurs, I tested an alternate but similar procedure that does not produce an error (which is probably the intended behavior):
Open Godot.
Click on "Create"
Uncheck the "Create Folder" option.
Leave the "Project Name" field empty.
Check the "Create Folder" option again.
Enter a project name.
I also looked into editor/project_manager/project_dialog.cpp. It seems that when "Create Folder" is toggled off and "Project Name" is empty, the script will remove the original home path and save it as the last custom target directory. When "Create Folder" is toggled on again and the script adds the last save path back, since the target path is now equal to the original home path, the script throws an error as it's an invalid path to create a project in.
This doesn't happen when "Create Folder" is toggled off before clearing "Project Name" because, I'm guessing, the auto directory generated by "Project Name" input is saved and removed instead of the home path. So when it's added back in when "Create Folder" is toggled back on, the restored path is a valid one.
This is my guess of how this bug happened, but I'm not sure how the code should be modified. Please let me know if I'm missing anything and give any suggestions on how to approach the fix. Thanks!
Tested versions
System information
Godot v4.3.stable - Windows 10.0.26100 - Vulkan (Forward+) - dedicated Radeon (TM) RX 480 Graphics - AMD Ryzen 7 2700 Eight-Core Processor (16 Threads)
Issue description
When trying to create a new project in Godot, if I leave the "Project Name" field empty and uncheck the "Create Folder" option, then check it again and attempt to enter a project name, I encounter the following errors:
Steps to reproduce
Minimal reproduction project (MRP)
N/A
The text was updated successfully, but these errors were encountered: