install: check for proper return from dirent_ensure_type
Fixes 'systemctl list-unit-files', which previously returned only: Failed to issue method call: No such file or directory
This commit is contained in:
parent
3cc588803d
commit
fb5ef067c4
|
@ -1853,7 +1853,7 @@ int unit_file_get_list(
|
|||
|
||||
r = dirent_ensure_type(d, de);
|
||||
if (r < 0) {
|
||||
if (errno == ENOENT)
|
||||
if (r == -ENOENT)
|
||||
continue;
|
||||
|
||||
goto finish;
|
||||
|
|
Loading…
Reference in a new issue