You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one has an application that has hardlinked shims or proxies they also need to be delayed until restart. This is a problem that rustup also ran into. This would require more flexible APIs for both deletion and replacement and quite likely on windows it might require given the user some options about how to delete them.
Either the processes need to be terminated first, or the deletion has to be delayed somehow. Unfortunately MOVEFILE_DELAY_UNTIL_REBOOT requires elevated privileges.
One way in which this might work is to have an API like this:
letmut replacer = Replacer::new();
replacer.self_delete()?;
replacer.delete_alias("path/to/hardlinked/file")?;// or
replacer.self_replace("new-file")?;
replacer.self_replace_no_copy("path/to/hardlink/to/new-file");
Behind the scenes the first operation to the executor on windows could spawn the subprocess and then they use an anonymous pipe to communicate the files that should be deleted or replaced. A new API self_replace_no_copy would also need to be created so that hardlinks are not converted into copies.
If one has an application that has hardlinked shims or proxies they also need to be delayed until restart. This is a problem that rustup also ran into. This would require more flexible APIs for both deletion and replacement and quite likely on windows it might require given the user some options about how to delete them.
Either the processes need to be terminated first, or the deletion has to be delayed somehow. Unfortunately
MOVEFILE_DELAY_UNTIL_REBOOT
requires elevated privileges.Related rustup issues:
The text was updated successfully, but these errors were encountered: