[PATCH 1/2] util: Fully resolve paths with virFileComparePaths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: James Le Cuirot <jlecuirot@xxxxxxxxxxxxx>

The description says it "resolve all symlinks", but it was only
resolving the last component.

Signed-off-by: James Le Cuirot <jlecuirot@xxxxxxxxxxxxx>
---
 src/util/virfile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virfile.c b/src/util/virfile.c
index 3b7a795..a5c9fbe 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);
 
-- 
2.49.0



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux