X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=sha1_file.c;h=e73cd4fc0ba2daac14f604f1973d1b0658212b26;hb=d183663785c0d78f73b31ad43fa57b0742d2a95c;hp=bd5edd8e657536e60fcb68d427df134c84f816c5;hpb=fd73ccf27956f24dc0db9acd4ff7d9dcd5e41bfb;p=git.git diff --git a/sha1_file.c b/sha1_file.c index bd5edd8e6..e73cd4fc0 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -2251,7 +2251,7 @@ int move_temp_to_file(const char *tmpfile, const char *filename) goto out; ret = errno; } - unlink(tmpfile); + unlink_or_warn(tmpfile); if (ret) { if (ret != EEXIST) { return error("unable to write sha1 filename %s: %s\n", filename, strerror(ret));