Skip to content
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

Disallow creating a project in the Home or Documents folder #74964

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

clayjohn
Copy link
Member

This is a temporary fix for #74678.

This PR does 2 things:

  1. It disallows creating projects in the "Home" or "Documents" folders which are the default paths used by the editor for new projects. Users will have to select another path, or create a new folder. The previous warning is still in place for other non-empty folders

Project creation menu by default
Screenshot from 2023-03-15 15-46-43

Project creation menu when another non-empty path is chosen
Screenshot from 2023-03-15 15-46-56

  1. It removes the option to delete the project contents. This option is useful, but without further safeguards it is much to dangerous. We need to remove it ASAP until we can implement it in a safer way. I left the previous code commented out so that we are incentivized to fix it.
    Screenshot from 2023-03-15 15-47-15

@Calinou
Copy link
Member

Calinou commented Mar 15, 2023

I suggest also preventing creating projects directly within OS.get_executable_path(), as per #60332. This way, #60332 will be fully addressed and you won't be able to "brick" the editor by creating a project anymore.

Also don't prompt users to delete the project folder for now.

This is a temporary fix to ensure that users do not delete their entire home folders by mistake
@clayjohn
Copy link
Member Author

OS.get_executable_path()

Added!

image

@akien-mga akien-mga merged commit e01b828 into godotengine:master Mar 16, 2023
@akien-mga
Copy link
Member

Thanks!

@clayjohn clayjohn deleted the pm-file-safety branch March 16, 2023 00:41
@Calinou
Copy link
Member

Calinou commented Mar 16, 2023

PS: While this is labeled cherrypick:4.0, it's probably a good idea to create a dedicated 3.x PR for 3.6 too (the project manager code is different, so this can't be cherry-picked cleanly).

@YuriSizov
Copy link
Contributor

Cherry-picked for 4.0.1.

@skyatgit
Copy link

skyatgit commented Apr 3, 2023

Will the option to delete project content come back in the future?

@AThousandShips
Copy link
Member

AThousandShips commented Apr 3, 2023

As the PR says it's temporary and while working on a way to do it safely, see also #56420

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants