desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: Important: HTTPIE deletes files of other programs during uninstall if installed incorrectly

Open Alfamari opened this issue 10 months ago • 2 comments

What happened?

During uninstallation HTTPIE will delete ALL items in it's installation directory rather than filtering out/specifying it's own assets. Which means if the user incorrectly installs the program to a target folder with other contents in it, uninstalling HTTPIE will wipe everything in that folder.

https://github.com/httpie/desktop/assets/132071593/a55788b4-a307-406a-a1c3-f4f8c4f45572

Steps to reproduce?

1. Download HTTPIE with winget: winget download httpie
2. Install winget with /D flag to specify directory: HTTPie_2024.1.2_User_X64_nullsoft_en-US.exe /D='D:\Program Files (x86)\' (do not specify sub-directory)
3. Uninstall HTTPIE with the executable: Uninstall HTTPIE.exe

4. Watch in horror and confusion as unrelated files quickly get deleted.
5. Scramble to cancel the process externally as the built-in cancel/close buttons are locked.
6. Execute file recovery steps.

What did you expect to happen?

I expected HTTPIE to auto-generate it's own subfolder despite specifying /D flag during installation process. (This isn't something HTTPIE needs to change I just got confused because different programs handle things differently. And it explains how I got myself into this mess.)

The real issue is when I went to uninstall HTTPIE I expected it to only specify its OWN assets for deletion rather than assuming it will always be in an isolated folder at all times therefore assuming its safe to delete everything. I also expected the cancel/close buttons to either cancel or terminate the process. I did not expect the cancel/close buttons to be locked denying user intervention.

Platform

Windows

HTTPie Desktop version

2024.1.2

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

Alfamari avatar Apr 06 '24 00:04 Alfamari