systemctl: Improve link directory separator error message

Let's suggest users try ./<filename> when they encounter this error.
This commit is contained in:
Daan De Meyer
2022-09-22 11:57:51 +02:00
parent 92f95ae707
commit 445d29766a
+2 -1
View File
@@ -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);