mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-03 14:58:01 +02:00
configuration: convert file paths from relative to absolute if necessary
This commit is contained in:
parent
55a6d20def
commit
630a6f5e1c
1 changed files with 5 additions and 1 deletions
|
|
@ -282,6 +282,7 @@ wp_configuration_reload (WpConfiguration *self, const char *extension)
|
|||
GDir *conf_dir = NULL;
|
||||
GError *error = NULL;
|
||||
const gchar *file_name = NULL;
|
||||
g_autofree gchar *cwd = g_get_current_dir ();
|
||||
|
||||
g_return_if_fail (WP_IS_CONFIGURATION (self));
|
||||
|
||||
|
|
@ -330,7 +331,10 @@ wp_configuration_reload (WpConfiguration *self, const char *extension)
|
|||
while ((file_name = g_dir_read_name (conf_dir))) {
|
||||
/* Only parse files that have the proper extension */
|
||||
if (g_str_has_suffix (file_name, ext)) {
|
||||
g_autofree gchar * location = g_build_filename (path, file_name, NULL);
|
||||
g_autofree gchar * location =
|
||||
g_path_is_absolute (path) ?
|
||||
g_build_filename (path, file_name, NULL) :
|
||||
g_build_filename (cwd, path, file_name, NULL);
|
||||
|
||||
wp_debug_object (self, "loading config file: %s", location);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue