Skip to content

Commit f88023d

Browse files
committed
fix retrieve link path
1 parent 7f2cc2a commit f88023d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,11 @@ fn retrieve_symlink(
238238
}
239239
};
240240
let link_path = if link_path.as_path().is_relative() {
241-
path.join(link_path)
241+
if let Some(p) = path.parent() {
242+
p.join(link_path)
243+
} else {
244+
link_path
245+
}
242246
} else {
243247
link_path
244248
};

0 commit comments

Comments
 (0)