From: Carlos Henrique Lima Melara Date: Thu, 5 Jun 2025 12:29:06 +0000 (+0200) Subject: curl_path: make SFTP handle a path like /~ properly. X-Git-Tag: rc-8_15_0-1~115 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=0ede81dcc61844cecce8904fb4de24319afeb024;p=thirdparty%2Fcurl.git curl_path: make SFTP handle a path like /~ properly. ... without a trailing slash. Fixes #17534 Closes #17542 --- diff --git a/lib/vssh/curl_path.c b/lib/vssh/curl_path.c index 117d2e6009..474a5ecb8e 100644 --- a/lib/vssh/curl_path.c +++ b/lib/vssh/curl_path.c @@ -84,6 +84,12 @@ CURLcode Curl_getworkingpath(struct Curl_easy *data, return CURLE_OUT_OF_MEMORY; } } + else { + if(curlx_dyn_add(&npath, "/")) { + free(working_path); + return CURLE_OUT_OF_MEMORY; + } + } } if(curlx_dyn_len(&npath)) {