]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect-image: Fix mount_point_is_available()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 13 Aug 2023 20:16:28 +0000 (22:16 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 14 Aug 2023 12:22:38 +0000 (14:22 +0200)
We call dir_is_empty() to check if the directory is empty but don't
take the result into account when returning from the function.

src/shared/dissect-image.c

index 6334c0cd22e86b89159e50c78b7d7f61bc5c7d6b..b4fbc771773457ce0b180877b02170c679a57c42 100644 (file)
@@ -2040,7 +2040,7 @@ static int mount_point_is_available(const char *where, const char *path, bool mi
                 return false;
         if (r < 0)
                 return log_debug_errno(r, "Failed to check directory \"%s\": %m", p);
-        return true;
+        return r > 0;
 }
 
 int dissected_image_mount(