core: move path_kill_slashes() to manager

This commit is contained in:
Yu Watanabe
2017-12-19 10:44:20 +09:00
parent 5976f1ca76
commit e7bcff4ec4
2 changed files with 3 additions and 3 deletions
+3 -1
View File
@@ -2323,7 +2323,7 @@ int bus_exec_context_set_transient_property(
return r;
STRV_FOREACH(p, l) {
const char *i = *p;
char *i = *p;
size_t offset;
if (!utf8_is_valid(i))
@@ -2333,6 +2333,8 @@ int bus_exec_context_set_transient_property(
offset += i[offset] == '+';
if (!path_is_absolute(i + offset))
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid %s", name);
path_kill_slashes(i + offset);
}
if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
-2
View File
@@ -1008,8 +1008,6 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen
return -EINVAL;
}
path_kill_slashes(word + offset);
r = sd_bus_message_append_basic(m, 's', word);
if (r < 0)
return bus_log_create_error(r);