From 6c76f6786d8962743835f300feeafc6a13d9b50a Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 6 Nov 2014 11:38:55 +0100 Subject: [PATCH] xbps_repo_open: do not create repodata file in locked mode. ... we want a proper errno value (ENOENT) if the archive does not exist. --- lib/repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repo.c b/lib/repo.c index e432e52e..60d2bb82 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -146,7 +146,7 @@ xbps_repo_open(struct xbps_handle *xhp, const char *url, bool lock) * Open or create the repository archive. */ if (lock) - repo->fd = open(repofile, O_CREAT|O_RDWR, 0664); + repo->fd = open(repofile, O_RDWR); else repo->fd = open(repofile, O_RDONLY);