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:
Dave Reisner 2012-04-02 09:08:35 -04:00 committed by Lennart Poettering
parent 3cc588803d
commit fb5ef067c4

View file

@ -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;