X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Finstall.c;h=4f7179309e80eb056b7bbb8bd18232927f98d5d0;hb=7cfa80f07e94c3e48703d145ef03a73dd6e7b983;hp=afb2e5374ab12975c90f8c87030740e1fdf2a777;hpb=278fa5758c8e30f03c8c50f15873d55edfc4cbaf;p=elogind.git diff --git a/src/shared/install.c b/src/shared/install.c index afb2e5374..4f7179309 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -160,12 +160,16 @@ static int add_file_change( if (!c[i].path) return -ENOMEM; + path_kill_slashes(c[i].path); + if (source) { c[i].source = strdup(source); if (!c[i].source) { free(c[i].path); return -ENOMEM; } + + path_kill_slashes(c[i].path); } else c[i].source = NULL; @@ -1124,7 +1128,7 @@ static int unit_file_search( * enablement was requested. We will check if it is * possible to load template unit file. */ - _cleanup_free_ char *template = NULL, *template_dir = NULL; + _cleanup_free_ char *template = NULL; template = unit_name_template(info->name); if (!template)