From: Daan De Meyer Date: Sun, 13 Aug 2023 20:16:28 +0000 (+0200) Subject: dissect-image: Fix mount_point_is_available() X-Git-Tag: v255-rc1~729 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e36c6210b7e1509206514dccedb73f7a1a5c4de1;p=thirdparty%2Fsystemd.git dissect-image: Fix mount_point_is_available() 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. --- diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 6334c0cd22e..b4fbc771773 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -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(