mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-29 20:11:16 +00:00
util: Small refactor
Prepare for further changes. Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
dcb9ee99f3
commit
d92054c867
@ -1743,15 +1743,17 @@ virFindFileInPath(const char *file)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
path = g_find_program_in_path(file);
|
path = g_find_program_in_path(file);
|
||||||
if (!path)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
|
if (path) {
|
||||||
/* Workaround for a bug in g_find_program_in_path() not returning absolute
|
/* Workaround for a bug in g_find_program_in_path() not returning absolute
|
||||||
* path as documented. TODO drop it once we require GLib >= 2.69.0
|
* path as documented. TODO drop it once we require GLib >= 2.69.0
|
||||||
*/
|
*/
|
||||||
return g_canonicalize_filename(path, NULL);
|
return g_canonicalize_filename(path, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static bool useDirOverride;
|
static bool useDirOverride;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user