aboutsummaryrefslogtreecommitdiff
path: root/dotup_cli/src/commands/link.rs
diff options
context:
space:
mode:
Diffstat (limited to 'dotup_cli/src/commands/link.rs')
-rw-r--r--dotup_cli/src/commands/link.rs5
1 files changed, 4 insertions, 1 deletions
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(
106 .strip_prefix(base_canonical) 106 .strip_prefix(base_canonical)
107 .expect("Failed to remove prefix from origin path"); 107 .expect("Failed to remove prefix from origin path");
108 let destination = destination.join(partial); 108 let destination = destination.join(partial);
109 let origin = origin_canonical
110 .strip_prefix(depot.base_path())
111 .unwrap_or(&origin_canonical);
109 112
110 let link_params = LinkCreateParams { 113 let link_params = LinkCreateParams {
111 origin: origin_canonical, 114 origin: origin.to_path_buf(),
112 destination, 115 destination,
113 }; 116 };
114 params.push(link_params); 117 params.push(link_params);