Skip to content

Commit

Permalink
Fix #101
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperCuber committed Jun 25, 2022
1 parent 69c2054 commit 95a7a75
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/filesystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,12 @@ impl Filesystem for RealFilesystem {
owner, link, target
);
}
fs::symlink_file(
real_path(target).context("get real path of source file")?,
link,
)
let real_target_path = real_path(target).context("get real path of source file")?;
if real_target_path.is_dir() {
fs::symlink_dir(real_target_path, link)
} else {
fs::symlink_file(real_target_path, link)
}
.context("create symlink")
}

Expand Down

0 comments on commit 95a7a75

Please sign in to comment.