build: fix `-Wformat-truncation` compiler warning
The path buffer's size is `PATH_MAX`, whilst we write two paths into it, the latter (`dent->d_name`) also having a maximum size of `PATH_MAX`, which triggers `-Wformat-truncation` compiler warning: check the return value of `snprintf` and mimic a system error if the path got truncated. Needed for #7862 NO_CHANGELOG=build NO_DOC=build NO_TEST=build
Loading
Please register or sign in to comment