aboutsummaryrefslogtreecommitdiff
path: root/src/dots.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/dots.rs')
-rw-r--r--src/dots.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dots.rs b/src/dots.rs
index 5b75254..0259c0c 100644
--- a/src/dots.rs
+++ b/src/dots.rs
@@ -8,7 +8,7 @@ pub fn deploy_dots(dots: Vec<Dot>, dots_dir: PathBuf) {
let prepended_dots = dots.iter().map(|m|
Dot {
source: dots_dir.join(&m.source),
- destination: prepend_user_dir(&m.destination)
+ destination: if m.destination.is_absolute() { m.destination.clone() } else { prepend_user_dir(&m.destination) }
}
);
@@ -45,4 +45,4 @@ pub fn unlink_dots(dots: Vec<Dot>, dots_dir: PathBuf) {
fn prepend_user_dir(path: &PathBuf) -> PathBuf {
home_dir().unwrap().join(path)
-} \ No newline at end of file
+}