[PATCH 01/15] log_cleaner: Use virFileCanonicalizePath()

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

 



From: Michal Privoznik <mprivozn@xxxxxxxxxx>

While use of realpath() is not forbidden, our some of our mocks
already have a test friendly reimplementation of
virFileCanonicalizePath(). Use the latter.

Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
---
 src/logging/log_cleaner.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/logging/log_cleaner.c b/src/logging/log_cleaner.c
index 4efcbc18e4..d247fdf829 100644
--- a/src/logging/log_cleaner.c
+++ b/src/logging/log_cleaner.c
@@ -66,7 +66,7 @@ virLogCleanerParseFilename(const char *path,
     g_autofree char *clear_path = NULL;
     char *chain_prefix = NULL;
 
-    clear_path = realpath(path, NULL);
+    clear_path = virFileCanonicalizePath(path);
     if (!clear_path) {
         VIR_WARN("Failed to resolve path %s: %s", path, g_strerror(errno));
         return NULL;
-- 
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