diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-04-08 17:59:41 +0300 |
---|---|---|
committer | shadchin <shadchin@yandex-team.ru> | 2022-04-08 17:59:41 +0300 |
commit | 3ddbfb08ff9f73d895488293e6a83b4ba68b3c5a (patch) | |
tree | e9250668656f42d41807809160f7919ef3630ee9 /contrib/libs/curl/lib/curl_path.c | |
parent | 61f0d7ab77dad7c33fb4d2570d36e4e76f672bbf (diff) | |
download | ydb-3ddbfb08ff9f73d895488293e6a83b4ba68b3c5a.tar.gz |
CONTRIB-2513 Update contrib/libs/curl to 7.75.0
ref:7c8de2c266b810de3b31604360c6ad878fa166ab
Diffstat (limited to 'contrib/libs/curl/lib/curl_path.c')
-rw-r--r-- | contrib/libs/curl/lib/curl_path.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/libs/curl/lib/curl_path.c b/contrib/libs/curl/lib/curl_path.c index 8763830e7a..9cfe089714 100644 --- a/contrib/libs/curl/lib/curl_path.c +++ b/contrib/libs/curl/lib/curl_path.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -31,12 +31,11 @@ #include "memdebug.h" /* figure out the path to work with in this particular request */ -CURLcode Curl_getworkingpath(struct connectdata *conn, +CURLcode Curl_getworkingpath(struct Curl_easy *data, char *homedir, /* when SFTP is used */ char **path) /* returns the allocated real path to work with */ { - struct Curl_easy *data = conn->data; char *real_path = NULL; char *working_path; size_t working_path_len; @@ -47,7 +46,7 @@ CURLcode Curl_getworkingpath(struct connectdata *conn, return result; /* Check for /~/, indicating relative to the user's home directory */ - if(conn->handler->protocol & CURLPROTO_SCP) { + if(data->conn->handler->protocol & CURLPROTO_SCP) { real_path = malloc(working_path_len + 1); if(real_path == NULL) { free(working_path); @@ -59,7 +58,7 @@ CURLcode Curl_getworkingpath(struct connectdata *conn, else memcpy(real_path, working_path, 1 + working_path_len); } - else if(conn->handler->protocol & CURLPROTO_SFTP) { + else if(data->conn->handler->protocol & CURLPROTO_SFTP) { if((working_path_len > 1) && (working_path[1] == '~')) { size_t homelen = strlen(homedir); real_path = malloc(homelen + working_path_len + 1); |