From 1c0dee8e60d9c1c989a3712e7d1e19debe981e8a Mon Sep 17 00:00:00 2001 From: diogo464 Date: Wed, 14 Jul 2021 15:07:32 +0100 Subject: Small changes to logging and docs. --- dotup_cli/src/commands/link.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'dotup_cli/src/commands/link.rs') diff --git a/dotup_cli/src/commands/link.rs b/dotup_cli/src/commands/link.rs index ed7ee55..4c1ae06 100644 --- a/dotup_cli/src/commands/link.rs +++ b/dotup_cli/src/commands/link.rs @@ -106,9 +106,12 @@ fn link_file( .strip_prefix(base_canonical) .expect("Failed to remove prefix from origin path"); let destination = destination.join(partial); + let origin = origin_canonical + .strip_prefix(depot.base_path()) + .unwrap_or(&origin_canonical); let link_params = LinkCreateParams { - origin: origin_canonical, + origin: origin.to_path_buf(), destination, }; params.push(link_params); -- cgit