chiark / gitweb /
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 174d79b..9256116 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;