Skip to content

Commit 0d0a2b9

Browse files
classabbyampDuncaen
authored andcommitted
bin/xbps-rindex/remove-obsoletes.c: always opendir() pwd
If repodir is given as a relative path, it will not work because it will try to open the dir relative to itself because it already chdir()ed into repodir. This fixes xbps-rindex -r when relative paths are specified. fixes #519
1 parent 0990b2e commit 0d0a2b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bin/xbps-rindex/remove-obsoletes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ remove_obsoletes(struct xbps_handle *xhp, const char *repodir)
134134
rv = errno;
135135
goto out;
136136
}
137-
if ((dirp = opendir(repodir)) == NULL) {
137+
if ((dirp = opendir(".")) == NULL) {
138138
fprintf(stderr, "xbps-rindex: failed to open %s: %s\n",
139139
repodir, strerror(errno));
140140
rv = errno;

0 commit comments

Comments
 (0)