summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/systemctl/systemctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d48160e008..1f18f9cb0b 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2339,7 +2339,7 @@ static int unit_find_paths(
_cleanup_free_ char *template = NULL;
r = unit_name_template(unit_name, &template);
- if (r != -EINVAL)
+ if (r < 0 && r != -EINVAL)
return log_error_errno(r, "Failed to determine template name: %m");
if (r >= 0) {
r = unit_file_find_path(lp, template, &path);