Repository navigation
Fixed Cryptomator not being completely removed during uninstall - #4228
Merged
Merged
Conversation
…he lines responsible for uploading the .asc file, so that I can build the project using GitHub workflows without any errors
…as from host and an if statement that checks when to execute the Remove-AliasFromHost function. I added to patchWebDAV.bat a second argument so it can be defined if it's supposed to install or uninstall. I added to main.wxs a new instruction PatchWebDAVUninstall. This way I can pass the "uninstall" instruction to the patchWebDAV.bat. In InstallExecuteSequence I made so that the PatchWebDAVUninstall only gets executed before the files get removed so that the patchWebDAV.bat doesn't get deleted before deleting the hosts entry.
overheadhunter
requested changes
Apr 27, 2026
infeo
requested changes
Apr 27, 2026
I updated Add-AliasToHost with the write-and-move pattern using a temporary file just like in the Remove-AliasFromHost function. The install block now only gets executed if the parameter is actually "install".
infeo
requested changes
Apr 28, 2026
infeo
approved these changes
Apr 28, 2026
overheadhunter
approved these changes
May 1, 2026
Member
|
@jose-cardoso-a22506616 Your commits are signed. For future contributions, please sign the commits, otherwise the PR will be closed. This time, i'll squash the changes such that the commits are signed with my sig/github. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes the issue #3993, where the Cryptomator alias remained in the Windows
hostsfile after uninstallation.I added to
main.wxsa CustomAction called PatchWebDAVUninstall which executes before the files get removed during uninstallation.I updated patchWebDAV.bat so it can receive a second argument that specifies if an action is "install" or "uninstall". I also defined a default value as "install" in case there are no arguments.
Finally, I updated the patchWebDAV.ps1. I added a parameter, $Action, to be possible to have an uninstall action. I also added a function called Remove-AliasFromHost. It works by saving the content of the
hostsfile to a temporary file without the alias and then it replaces the original file with the temporary one. I decided to use a temporary file for this because I ran into a lot of issues when writing directly into the original file. Most of time, it would erase all the information in the file. I did some research, and apparently if you do it that way the process can get interrupted which can cause that. Using a temporary file avoids this risk, since you're just replacing the original file.Fixes #3993