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

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

Open
1 task done
Alfamari opened this issue Apr 6, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Alfamari
Copy link

Alfamari commented Apr 6, 2024

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.

httpie.uninstall.trimmed.mp4

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

  • I agree to follow this project's Code of Conduct
@Alfamari Alfamari added the bug Something isn't working label Apr 6, 2024
@jkbrzt
Copy link
Member

jkbrzt commented Apr 15, 2024

@Alfamari, thanks for the report, and sorry about the trouble. This unfortunate behavior seems to be the default of electron-builder, which is what we use to generate the uninstaller. We’ll see if we can improve it.

@Alfamari
Copy link
Author

Alfamari commented Apr 21, 2024

@jkbrzt, No worries, fortunately by sheer luck I started the installation process with revo uninstaller which created a restore point RIGHT before.
In the process, I learned about file recovery and I was able to get EVERYTHING back. I've also used what I've learned from this experience to recover from other mistakes since then.

So while it was stressful in the moment, I was actually able to come out better because of it without any damage done.

Steps 4-6 were more for humor not anger, though looking back at it now it, seems like I missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants