]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: Avoid empty directory warning when we are bind-mounting a file (#8069)
authorAndrei Gherzan <andrei@gherzan.com>
Tue, 6 Feb 2018 15:35:52 +0000 (15:35 +0000)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Feb 2018 15:35:52 +0000 (16:35 +0100)
src/core/unit.c

index 4a5fa4005cac22afdd4d5bd6e5fa2d0dda1bee7f..5a17efdbcbb06bb68f362be190b4aa6bf6dd646e 100644 (file)
@@ -4726,7 +4726,7 @@ void unit_warn_if_dir_nonempty(Unit *u, const char* where) {
         assert(where);
 
         r = dir_is_empty(where);
-        if (r > 0)
+        if (r > 0 || r == -ENOTDIR)
                 return;
         if (r < 0) {
                 log_unit_warning_errno(u, r, "Failed to check directory %s: %m", where);