Retroarch: Uninstalling is Potentially Dangerous

Created on 1 Jan 2019  路  8Comments  路  Source: libretro/RetroArch

Description

I originally tried to change the location RetroArch was being installed to (Windows), but there were some issues with that. When I tried to set the install path back to the old value, I neglected to add a RetroArch folder, so the root of the installation directory was Users\[User]\AppData\Roaming\. After realizing this, I decided I'd be better off uninstalling, creating the correct directory, and reinstalling. I was unaware, however, that the uninstall will delete everything in its directory indiscriminately, so the installer happily started deleting files in discord, Microsoft, NordVPN, Dropbox, etc...

I managed to see what was happening a few seconds in and recovered most of what was lost after some headache. I know there was user error here, but I can't imagine the havoc this could wreak on somebody installing into Documents or Program Files.

Expected behavior

Uninstaller should delete only files and directories known to RetroArch. If somebody starts putting their own files into RetroArch's subdirectories, that's on them. But if I accidentally install a directory higher than I intended to, I should be able to safely run the uninstaller rather than trying to figure out what specific files and directories to delete.

Actual behavior

Uninstaller nukes the root of the install directory.

Environment information

  • OS: Windows 10
windows

Most helpful comment

@DavidRieman I just added a confirmation dialog on the installer, if they choose an existing folder:

This folder already exists, and its contents will be completely removed upon uninstallation. Continue?

All 8 comments

Well, I think this is a non-issue, I mean you changed the folder to that...
I don't think any uninstaller takes precautions with that.

However, many _installers_ do warn on or block targeting an existing, or non-empty folder. Which would probably have prevented this issue too, as it would have tipped off the user immediately when they targeted the wrong folder. I'd recommend at least addressing it this way to start.

In my opinion, at the end of the day, this _did_ happen to me, and I'm a software engineer. People make mistakes. And if it's a possibility to prevent it from happening with some configuration (or warning, as suggested), wouldn't it make some sense to implement that?

I've got no problem with whatever decision gets made. But I figured it warranted at least a call to attention/discussion.

@twinaphex Thoughts on this?

@DavidRieman I just added a confirmation dialog on the installer, if they choose an existing folder:

This folder already exists, and its contents will be completely removed upon uninstallation. Continue?

@Zunawe Is this acceptable enough for you?

@Zunawe Feel free to re-open if the warning doesn't suffice.

Whoops. I saw the comment on the email and had a response in mind but never posted it.

This would have prevented my issue, so it's good for me. Thanks!

Was this page helpful?
0 / 5 - 0 ratings