copy: a plain unlink() works here too

This commit is contained in:
Lennart Poettering 2017-02-21 17:13:28 +01:00
parent 71994cff31
commit ce21ed5c61
1 changed files with 1 additions and 1 deletions

View File

@ -558,7 +558,7 @@ int copy_file_atomic(const char *from, const char *to, mode_t mode, unsigned cha
} else
r = rename_noreplace(AT_FDCWD, t, AT_FDCWD, to);
if (r < 0) {
(void) unlink_noerrno(t);
(void) unlink(t);
return r;
}