Skip to content

Commit

Permalink
fix building for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
shellixyz committed Dec 5, 2022
1 parent a044eb0 commit c4d9916
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ impl SymlinkError {
}
}

#[cfg(unix)]
pub fn symlink<P: AsRef<Path>, Q: AsRef<Path>>(original_path: P, link_path: Q) -> Result<(), SymlinkError> {
std::os::unix::fs::symlink(&original_path, &link_path).map_err(|error| SymlinkError::new(original_path, link_path, error))
}

0 comments on commit c4d9916

Please sign in to comment.