xbps-rindex/repoflush.c: pass correct filename to unlink().
This commit is contained in:
parent
8018f53e0a
commit
286193515c
@ -115,14 +115,14 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir,
|
|||||||
fsync(repofd);
|
fsync(repofd);
|
||||||
#endif
|
#endif
|
||||||
if (fchmod(repofd, 0664) == -1) {
|
if (fchmod(repofd, 0664) == -1) {
|
||||||
unlink(repofile);
|
|
||||||
close(repofd);
|
close(repofd);
|
||||||
|
unlink(tname);
|
||||||
result = false;
|
result = false;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
close(repofd);
|
close(repofd);
|
||||||
if (rename(tname, repofile) == -1) {
|
if (rename(tname, repofile) == -1) {
|
||||||
unlink(repofile);
|
unlink(tname);
|
||||||
result = false;
|
result = false;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user