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>
tmp = g_strdup(path);
} else {
pathtmp = g_strdup(path + strlen(pathdir));
- if ((pathreal = realpath(pathdir, NULL)) == NULL) {
+ if (!(pathreal = virFileCanonicalizePath(pathdir))) {
vah_error(NULL, 0, pathdir);
vah_error(NULL, 0, _("could not find realpath"));
return rc;