xbps_repo_open: do not create repodata file in locked mode.

... we want a proper errno value (ENOENT) if the archive does not exist.
This commit is contained in:
Juan RP 2014-11-06 11:38:55 +01:00
parent 84be0dcd8b
commit 6c76f6786d

View File

@ -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);