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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
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;