client: port bfabc5450b to footclient

This commit is contained in:
Daniel Eklöf 2025-01-24 06:51:13 +01:00
parent bfabc5450b
commit 787e886ff0
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -401,10 +401,10 @@ main(int argc, char *const *argv)
const char *cwd = custom_cwd;
if (cwd == NULL) {
errno = 0;
size_t buf_len = 1024;
do {
_cwd = xrealloc(_cwd, buf_len);
errno = 0;
if (getcwd(_cwd, buf_len) == NULL && errno != ERANGE) {
LOG_ERRNO("failed to get current working directory");
goto err;