xbps-fbulk: do not make assert() change program behaviour.
... otherwise if NDEBUG is set chdir() is skipped completely.
This commit is contained in:
parent
702d64c517
commit
d927517327
@ -656,7 +656,10 @@ main(int argc, char **argv)
|
|||||||
* Process all directories in void-packages/srcpkgs, excluding symlinks
|
* Process all directories in void-packages/srcpkgs, excluding symlinks
|
||||||
* (subpackages).
|
* (subpackages).
|
||||||
*/
|
*/
|
||||||
assert(chdir(rpath) == 0);
|
if (chdir(rpath) == -1) {
|
||||||
|
fprintf(stderr, "ERROR: failed to chdir to %s: %s\n", rpath, strerror(errno));
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
if ((dir = opendir(rpath)) != NULL) {
|
if ((dir = opendir(rpath)) != NULL) {
|
||||||
while ((den = readdir(dir)) != NULL) {
|
while ((den = readdir(dir)) != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user