chiark / gitweb /
Be more careful when checking for empty files
[elogind.git] / src / network / networkd-network.c
index 700577f..3e46a1a 100644 (file)
@@ -48,8 +48,8 @@ static int network_load_one(Manager *manager, const char *filename) {
                         return -errno;
         }
 
-        if (null_or_empty_path(filename)) {
-                log_debug("skipping empty file: %s", filename);
+        if (null_or_empty_fd(fileno(file))) {
+                log_debug("Skipping empty file: %s", filename);
                 return 0;
         }