From 9346d577d2ddcf57df6bf60064c978b56348b068 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 4 Nov 2022 15:08:24 +0100 Subject: Actually make use of the temporary directory --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 8439302..1c0d487 100644 --- a/src/main.rs +++ b/src/main.rs @@ -123,7 +123,7 @@ fn try_move<'a>( new: &'a str ) -> Result<(), io::Error> { if Path::new(new).exists() { - let new_loc = tmpdir.path().to_str().unwrap().to_owned() + new; + let new_loc = tmpdir.path().to_str().unwrap().to_owned() + "/" + new; fs::rename(old, new_loc)?; conflicts.push(new); } else { @@ -133,7 +133,7 @@ fn try_move<'a>( } fn do_move(tmpdir: &TempDir, new: &str) -> Result<(), io::Error> { - let old = tmpdir.path().to_str().unwrap().to_owned() + new; + let old = tmpdir.path().to_str().unwrap().to_owned() + "/" + new; fs::rename(old, new)?; Ok(()) } -- cgit v1.2.3