I am always scared when I see code like this. What if due to misconfiguration or bug, we end up with gamw.install_dir being some important user directory? Disaster.
I propose to create filesystem_utils.py module, which will abstract file operation (especially destructive ones: move, remove) and make sure that they executed only in ~/.cache/minigalaxy or ~/.config/minigalaxy or Config.get("install_dir").
Then we can make all modules to use filesystem_utils instead of directly calling files operation.
With such a change it will be a lot safer to perform files operations.
If you approve. I can proceed with the work.
Best regards,
At the moment uninstalling game looks like:
I am always scared when I see code like this. What if due to misconfiguration or bug, we end up with gamw.install_dir being some important user directory? Disaster.
I propose to create filesystem_utils.py module, which will abstract file operation (especially destructive ones: move, remove) and make sure that they executed only in ~/.cache/minigalaxy or ~/.config/minigalaxy or Config.get("install_dir"). Then we can make all modules to use filesystem_utils instead of directly calling files operation. With such a change it will be a lot safer to perform files operations. If you approve. I can proceed with the work. Best regards,