From 989cdfb6ca8ad06e9b1c8df3a169c909d17abc97 Mon Sep 17 00:00:00 2001 From: YoungJules Date: Fri, 8 May 2026 09:27:50 +0200 Subject: [PATCH] Updated check for home shortcut following review --- client/deps/cliparser/cliparser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/deps/cliparser/cliparser.c b/client/deps/cliparser/cliparser.c index cbe4a683f..fac8645b0 100644 --- a/client/deps/cliparser/cliparser.c +++ b/client/deps/cliparser/cliparser.c @@ -44,7 +44,7 @@ static void expand_tilde_path(const char *src, char *dst, size_t dst_len) { } #endif - if (home != NULL && (strcmp(src, "~") == 0 || strncmp(src, "~/", 2) == 0 || strncmp(src, "~\\", 2) == 0)) { + if (home != NULL && src[0] == '~' && (src[1] == '\0' || src[1] == '/' || src[1] == '\\')) { snprintf(dst, dst_len, "%s%s", home, src + 1); return; }