mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +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,13 +1743,15 @@ virFindFileInPath(const char *file)
|
||||
return NULL;
|
||||
|
||||
path = g_find_program_in_path(file);
|
||||
if (!path)
|
||||
return NULL;
|
||||
|
||||
/* 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
|
||||
*/
|
||||
return g_canonicalize_filename(path, NULL);
|
||||
if (path) {
|
||||
/* 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
|
||||
*/
|
||||
return g_canonicalize_filename(path, NULL);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user