From 286193515c51a37af1e1ba04f2262877788351a1 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 18 Jun 2019 17:40:01 +0200 Subject: [PATCH] xbps-rindex/repoflush.c: pass correct filename to unlink(). --- bin/xbps-rindex/repoflush.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/xbps-rindex/repoflush.c b/bin/xbps-rindex/repoflush.c index 13750e3b..717366bb 100644 --- a/bin/xbps-rindex/repoflush.c +++ b/bin/xbps-rindex/repoflush.c @@ -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; }