xbps-rindex/repoflush.c: pass correct filename to unlink().

This commit is contained in:
Juan RP 2019-06-18 17:40:01 +02:00
parent 8018f53e0a
commit 286193515c

View File

@ -115,14 +115,14 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
fsync(repofd);
#endif
if (fchmod(repofd, 0664) == -1) {
unlink(repofile);
close(repofd);
unlink(tname);
result = false;
goto out;
}
close(repofd);
if (rename(tname, repofile) == -1) {
unlink(repofile);
unlink(tname);
result = false;
goto out;
}