From 445d29766a173836b4f4d0205c6d58eaa254f286 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 21 Sep 2022 20:42:06 +0200 Subject: [PATCH] systemctl: Improve link directory separator error message Let's suggest users try ./ when they encounter this error. --- src/systemctl/systemctl-enable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systemctl/systemctl-enable.c b/src/systemctl/systemctl-enable.c index a1ca837d4d7..730b4a494cd 100644 --- a/src/systemctl/systemctl-enable.c +++ b/src/systemctl/systemctl-enable.c @@ -25,7 +25,8 @@ static int normalize_filenames(char **names) { if (!strchr(*u,'/')) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "Link argument does contain at least one directory separator: %s", + "Link argument must contain at least one directory separator.\n" + "If you intended to link a file in the current directory, try ./%s instead.", *u); r = path_make_absolute_cwd(*u, &normalized_path); -- 2.47.3