diff options
author | Thomas Voss <mail@thomasvoss.com> | 2022-11-04 15:08:24 +0100 |
---|---|---|
committer | Thomas Voss <mail@thomasvoss.com> | 2022-11-04 15:08:24 +0100 |
commit | 9346d577d2ddcf57df6bf60064c978b56348b068 (patch) | |
tree | 1b0264857f010eba60b675b3b9d71207006105ea /src/main.rs | |
parent | f723136fd3b1483ad4f81b5f8e202370758371a6 (diff) |
Actually make use of the temporary directory
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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(()) } |