From: James Le Cuirot Date: Thu, 24 Jul 2025 13:49:37 +0000 (+0100) Subject: util: Fully resolve paths with virFileComparePaths X-Git-Tag: v11.6.0-rc2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=249476cbf9bac2d7574e383c260997243cdbab83;p=thirdparty%2Flibvirt.git util: Fully resolve paths with virFileComparePaths The description says it "resolve all symlinks", but it was only resolving the last component. Signed-off-by: James Le Cuirot Reviewed-by: Michal Privoznik --- diff --git a/src/util/virfile.c b/src/util/virfile.c index 3b7a795d45..a5c9fbe0d9 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -4108,11 +4108,11 @@ virFileComparePaths(const char *p1, const char *p2) * 'sysfs', since they're no real paths so fallback to plain string * comparison. */ - ignore_value(virFileResolveLink(p1, &res1)); + ignore_value(virFileResolveAllLinks(p1, &res1)); if (!res1) res1 = g_strdup(p1); - ignore_value(virFileResolveLink(p2, &res2)); + ignore_value(virFileResolveAllLinks(p2, &res2)); if (!res2) res2 = g_strdup(p2);