Updated check for home shortcut following review

This commit is contained in:
YoungJules committed 2026-05-08 09:27:50 +02:00
1 parent 28ba5fd840
commit 989cdfb6ca
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}