diff --git a/src/basic/path-util.c b/src/basic/path-util.c index 221517303ec..084e0a9f29d 100644 --- a/src/basic/path-util.c +++ b/src/basic/path-util.c @@ -1132,13 +1132,6 @@ int path_simplify_and_warn( path_simplify(path, true); - if (!path_is_normalized(path)) { - log_syntax(unit, LOG_ERR, filename, line, 0, - "%s= path is not normalized%s: %s", - lvalue, fatal ? "" : ", ignoring", path); - return -EINVAL; - } - if (!path_is_valid(path)) { log_syntax(unit, LOG_ERR, filename, line, 0, "%s= path has invalid length (%zu bytes)%s.", @@ -1146,5 +1139,12 @@ int path_simplify_and_warn( return -EINVAL; } + if (!path_is_normalized(path)) { + log_syntax(unit, LOG_ERR, filename, line, 0, + "%s= path is not normalized%s: %s", + lvalue, fatal ? "" : ", ignoring", path); + return -EINVAL; + } + return 0; }