From 7e3a6755f2c6ce17cd7d996cbefd5e37853cd916 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 22 Mar 2020 20:17:06 +0100 Subject: [PATCH] Remove superfluous unlink before rename --- src/legacy_util.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/legacy_util.cpp b/src/legacy_util.cpp index 06818e280..656d91f8e 100644 --- a/src/legacy_util.cpp +++ b/src/legacy_util.cpp @@ -178,7 +178,6 @@ clone_file(const char* src, const char* dest, bool via_tmp_file) close(src_fd); if (via_tmp_file) { - x_try_unlink(dest); if (x_rename(tmp_file, dest) != 0) { result = false; } @@ -238,7 +237,6 @@ copy_file(const char* src, const char* dest, bool via_tmp_file) close(src_fd); if (via_tmp_file) { - x_try_unlink(dest); if (x_rename(tmp_file, dest) != 0) { result = false; } -- 2.47.2