]> err.no Git - systemd/commitdiff
install: check for proper return from dirent_ensure_type
authorDave Reisner <dreisner@archlinux.org>
Mon, 2 Apr 2012 13:08:35 +0000 (09:08 -0400)
committerLennart Poettering <lennart@poettering.net>
Mon, 2 Apr 2012 19:47:18 +0000 (21:47 +0200)
Fixes 'systemctl list-unit-files', which previously returned only:

  Failed to issue method call: No such file or directory

src/install.c

index 174d79bab6bc3eb72de371fe968465fb5968927c..92561168059422f40ca15af0784056ec5b9177a4 100644 (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;