1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

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-21 20:42:06 +02:00
parent 92f95ae707
commit 445d29766a

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);