treesheets icon indicating copy to clipboard operation
treesheets copied to clipboard

Warn users when installing into a non-empty directory

Open kornelijepetak opened this issue 3 years ago • 6 comments

I have (or better yet: had) a bunch of software installed at C:\software\development.

I wanted to install your app at C:\software\development\treesheets but I pressed next too early, so it installed all the files into the C:\software\development instead. So, instead of manually deleting all the files and folders that the installer put there, I ran the uninstaller.

Well, the important part is that once the uninstaller removed the files of the application, it started to remove the root folder of the installation. This should not be the case. The uninstaller should NOT remove the root folder if it has not created it or it contains files not created by the installer.

You can't fix my problem now, but maybe put this warning somewhere or replace/fix the un/installer.

kornelijepetak avatar Sep 11 '22 07:09 kornelijepetak

Yup that is lazyness.. here's the offending section of the installer script:

https://github.com/aardappel/treesheets/blob/master/TS_installer.nsi#L104-L112

That would need to be replaced by an exact list of the files it installs.

That said, you're the first to install it into a dir with existing files, it is normally not a problem.

aardappel avatar Sep 11 '22 14:09 aardappel

As I said, I have to take care of the fallout myself 😄 It's my fault to have the \ character immediately next to an Return/Enter. 🤷‍♂️

Ok, after several hours of reinstalling various applications, let me now get this TreeSheets into the right folder 😄

kornelijepetak avatar Sep 11 '22 18:09 kornelijepetak

Easier "fix" might be to warn when the installation folder isn't empty?

stevehansen avatar Sep 11 '22 19:09 stevehansen

Well, the folder is never empty because it at least has the TS files in it.

PRs for more precise installer behavior welcome.

aardappel avatar Sep 12 '22 04:09 aardappel

I see my message wasn't as clear as I intended, warn during installation that the installation folder isn't empty.

stevehansen avatar Sep 12 '22 05:09 stevehansen

I have changed the title of the issue in order to make this issue more of a real issue than a rant. Somebody more versed in NSIS could maybe know how to do this easily. I never used it so I can't make a PR. But at least now, it's an issue, and not just my rant. 😉

kornelijepetak avatar Sep 12 '22 07:09 kornelijepetak