Skip to content

Commit

Permalink
Restore 1.48 support
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Sep 19, 2023
1 parent c83c0c7 commit 10d59fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn self_delete() -> Result<(), io::Error> {

pub fn self_replace(new_executable: &Path) -> Result<(), io::Error> {
let mut exe = env::current_exe()?;
if exe.is_symlink() {
if exe.metadata().map_or(false, |x| x.file_type().is_symlink()) {
exe = fs::read_link(exe)?;
}
let old_permissions = exe.metadata()?.permissions();
Expand Down

0 comments on commit 10d59fa

Please sign in to comment.