bootctl: properly handle readdir() errors

This commit is contained in:
Lennart Poettering 2019-02-06 17:48:40 +01:00
parent 882b3bd6c5
commit 0d73a81611

View file

@ -583,7 +583,7 @@ static int install_binaries(const char *esp_path, bool force) {
if (!d)
return log_error_errno(errno, "Failed to open \""BOOTLIBDIR"\": %m");
FOREACH_DIRENT(de, d, break) {
FOREACH_DIRENT(de, d, return log_error_errno(errno, "Failed to read \""BOOTLIBDIR"\": %m")) {
int k;
if (!endswith_no_case(de->d_name, ".efi"))