-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow creating project in a nonempty directory. #39220
Conversation
Currently we disallow creating a project in a directory that has any unhidden files. This is unnecessarily restrictive, as there are only 3 files we create that could conflict. We should only disallow creation if the directory contains one of those 3 files. A common flow for me is to start creating models in Blender before creating a Godot project.
Let me know if I should create an improvement proposal for this. It was a small annoyance, and it was just as easy to submit a PR as write up a proposal. Relates a bit to #25925. |
UX-wise this is worse. You should not be able to create a project in a non-empty directory unless you are absolutely sure to do so. Otherwise, if a user makes a mistake it will be very difficult to clean it up (even if it's only a matter of deleting a few files, the user should not have to know which files were created). The right solution would be to display a big warning when you try to setup a project in a non-empty directory, and ask for confirmation before creating the project. Until then, I believe it's better to forbid the creation of projects in non-empty folders. |
Alternatively, we can always automatically create a new folder inside the chosen folder, this is what Unity does and it works fine. In the rare case I want to use an existing folder for a unity project, I just copy paste the generated stuff into the parent directory. If we always recommend that users create a new folder, why is it even a separate step? |
Original issue (#15775) do not exist anymore for some reason, but creating projects in the non-empty folder was disabled (in #15835) to prevent accidentally selecting |
A quick recap of original deleted #15775 issue, extracted from archived emails. First posts are missing, but there are some interesting interface improvement suggestions, that were never implemented. |
Thanks for the context! Based on the import-explosion issue, I agree my proposal is not a good idea. A warning dialog might be better, but I also don't want to overcomplicate something that should be simple. I find that creating projects in nonempty directories is not uncommon for me, but maybe I'm just weird. I could just get in the habit of copying a skeleton project over manually 🤷 |
I think that this should not be allowed by default. But we can make it a checkbox somewhere for power users which shows confirmation and/or warning when checked because this behavior still not advisable. |
So, after thinking about it some more, I don't think this is a good solution, nor do I think it is worth adding complexity for the "power users". I'm cool with leaving the current behavior as-is. Power users can figure out how to copy a project skeleton manually. |
I still think we should always automatically create a new folder inside the chosen folder, this is what Unity does and it works fine. Why would it be a separate step if it's the workflow we heavily enforce? |
Because you can select an empty folder right away and you would then have to select the parent folder. I like the current way, as it is clear what is done. |
Same, at least for me, forcing the creation of the directory would defeat the point. I specifically want to initialize a project in a directory that already contains assets. I'll think I'll just get in the habit of copying project files over. |
Can we re-open this? It is rather annoying to have to create a new directory just to instantiate my project where I may already have other content setup (assets and git being popular choices here). I would much rather have a warning dialog, with ok/cancel options for creating my project in a non-empty directory. Having setup a directory with something else first shouldn't disallow me from creating a project there. I have to specifically remember this weird rule when setting projects for a jam or helping others get started with godot. |
Currently we disallow creating a project in a directory that has any
unhidden files. This is unnecessarily restrictive, as there are only 3
files we create that could conflict. We should only disallow creation if
the directory contains one of those 3 files.
A common flow for me is to start creating models in Blender before
creating a Godot project.