trivrost
trivrost copied to clipboard
Self-update: Cannot move binary under certain conditions
The following problem was found occurring in the wild.
P Could not rename running binary. [godown/bundle/update_self.go:(*Updater)():103] err=rename F:\Application Data\Setlog\***\***.exe F:\Application Data\Setlog\***\~***.old.f556990e1e510594: The process cannot access the file because it is being used by another process., localBinaryPath=F:\Application Data\Setlog\***\***.exe, oldBinaryNewPath=F:\Application Data\Setlog\***\~***.exe.old.f556990e1e510594
This could be caused by pretty much anything. Anti-virus and dodgy security software comes to mind. Failing hard is never a good reaction. How should we deal with cases such as this?
Random suggestion: Like with downloads, keep retrying and show a status-message 'Retrying to update the launcher (the binary is locked by another process)'