conf-files: fstatat() sets errno on failure

Follow-up for 50c81130b6.
This commit is contained in:
Yu Watanabe
2025-06-29 10:15:56 +09:00
parent 07c2fadbed
commit cdd3aba3df
+4 -7
View File
@@ -100,13 +100,10 @@ static int files_add(
continue;
}
if (need_stat) {
r = fstatat(rfd, resolved_path, &st, AT_SYMLINK_NOFOLLOW);
if (r < 0) {
log_debug_errno(r, "Failed to stat '%s/%s', ignoring: %m",
root, skip_leading_slash(p));
continue;
}
if (need_stat && fstatat(rfd, resolved_path, &st, AT_SYMLINK_NOFOLLOW) < 0) {
log_debug_errno(errno, "Failed to stat '%s/%s', ignoring: %m",
root, skip_leading_slash(p));
continue;
}
} else {