]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
copy: a plain unlink() works here too
authorLennart Poettering <lennart@poettering.net>
Tue, 21 Feb 2017 16:13:28 +0000 (17:13 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 21 Feb 2017 20:41:32 +0000 (21:41 +0100)
src/basic/copy.c

index 6273ac9b4768c65aaf82dcc7314a490630531c51..e120b9eb4ef17bd810cf6d94b941a6051208835c 100644 (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;
         }