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

Add some safety checks before deleting folders #2699

Open
arielj opened this issue May 10, 2023 · 2 comments
Open

Add some safety checks before deleting folders #2699

arielj opened this issue May 10, 2023 · 2 comments
Labels
issue:investigating This issue is being actively investigated.

Comments

@arielj
Copy link
Collaborator

arielj commented May 10, 2023

Problem description

Currently some actions that we do delete a folder directly without checking its content, and if something bad happens we might delete something that we shouldn't.

Feature description

Before deleting a folder we should run some checks to ensure that the folder we are going to delete is correct, for example:

  • before deleting a prefix folder we should check if the folder contains files like dosdevices drive_c, pfx/dosdevices or pfx/drive_c
  • before deleting a game folder we should check if the folder contains some game file (we have some metadata about the game, I think we can check if the game executable is present)
  • before deleting a wine version we could check that it has the expected folder lib lib64 share bin

I think it doesn't hurt to be extra careful when deleting stuff.

Alternatives

not sure

Additional information

No response

@therealmate
Copy link

Also, when deleting a prefix, it should delete the files that belong to the prefix, not the entire folder.

@flavioislima flavioislima added the issue:investigating This issue is being actively investigated. label Jun 15, 2023
@arielj
Copy link
Collaborator Author

arielj commented Jan 7, 2025

I think this would be partially solved by #3989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue:investigating This issue is being actively investigated.
Projects
None yet
Development

No branches or pull requests

3 participants