Skip to content

Commit 2ff1daa

Browse files
Danilo Egea Gondolfoslyon
Danilo Egea Gondolfo
authored andcommitted
dbus: Build the copy path correctly
Dbus Config()/Get() were not working due to a missing / in the destination path.
1 parent 41eac17 commit 2ff1daa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dbus.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ _copy_yaml_state(char *src_root, char *dst_root, sd_bus_error *ret_error)
141141
gchar *dest_path = NULL;
142142
size_t len = strlen(src_root);
143143
for (size_t i = 0; i < gl.gl_pathc; ++i) {
144-
dest_path = g_strjoin(NULL, dst_root, (gl.gl_pathv[i])+len, NULL);
144+
dest_path = g_build_path(G_DIR_SEPARATOR_S, dst_root, (gl.gl_pathv[i])+len, NULL);
145145
source = g_file_new_for_path(gl.gl_pathv[i]);
146146
dest = g_file_new_for_path(dest_path);
147147
g_file_copy(source, dest, G_FILE_COPY_OVERWRITE

0 commit comments

Comments
 (0)