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

[feat] When files are found in the installation directory, the installation should be terminated. #9277

Closed
keiko233 opened this issue Mar 26, 2024 · 5 comments

Comments

@keiko233
Copy link

Describe the problem

In the current NSIS setup, installation is allowed in any user-selected directory. During uninstallation, all files in the current path are removed. If there are additional files present in the selected path, non-program files will also be deleted incidentally.

Describe the solution you'd like

We can address this issue during installation by checking if the user-selected path contains existing files, thus preventing potential issues during uninstallation.

Alternatives considered

Perhaps there are alternative and more effective implementations, such as recording the program's files in the registry or exploring other solutions.

Additional context

I have written a sample code here. If allowed, I would like to initiate a pull request.
here keiko233@460519e
image

associated Links:
libnyanpasu/clash-nyanpasu@78b18de
libnyanpasu/clash-nyanpasu#657

@FabianLars
Copy link
Member

If this is just about the uninstallation we can fix this as i described here instead.

In general i think allowing users to install the app into a not-empty folder is fine but maybe a dialog asking whether they're sure would be nice? 🤔 @amrbashir

@amrbashir
Copy link
Member

An Ok/Cancel dialog should be fine here

@amrbashir
Copy link
Member

@keiko233 if you want, please go ahead and open a PR to add a dialog to add an Ok/Cancel dialog

@keiko233
Copy link
Author

@keiko233 if you want, please go ahead and open a PR to add a dialog to add an Ok/Cancel dialog

Maybe my problem has been solved.
#9282
I will close this issue.

@linguofeng
Copy link

linguofeng commented Apr 10, 2024

image

Maybe that makes more sense, rather than having them mixed together 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants