diff options
author | Brad King <brad.king@kitware.com> | 2020-06-24 12:13:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-24 12:13:02 (GMT) |
commit | 0ef8fa5000cddd5b0c3908a765a2c2d482bc2fdf (patch) | |
tree | 7f02ed6d5e482522263c1ad8e027132363055678 /Utilities/cmcurl/lib/file.c | |
parent | 39f7cfad31aed063a1199a5d67c99c53a182b746 (diff) | |
parent | 5717fdc114a704cddae629e20e6588191360e98a (diff) | |
download | CMake-0ef8fa5000cddd5b0c3908a765a2c2d482bc2fdf.zip CMake-0ef8fa5000cddd5b0c3908a765a2c2d482bc2fdf.tar.gz CMake-0ef8fa5000cddd5b0c3908a765a2c2d482bc2fdf.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2020-06-23 (e9db32a0)
Diffstat (limited to 'Utilities/cmcurl/lib/file.c')
-rw-r--r-- | Utilities/cmcurl/lib/file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Utilities/cmcurl/lib/file.c b/Utilities/cmcurl/lib/file.c index 2492370..576a794 100644 --- a/Utilities/cmcurl/lib/file.c +++ b/Utilities/cmcurl/lib/file.c @@ -136,7 +136,7 @@ static CURLcode file_connect(struct connectdata *conn, bool *done) struct Curl_easy *data = conn->data; char *real_path; struct FILEPROTO *file = data->req.protop; - int fd = -1; + int fd; #ifdef DOS_FILESYSTEM size_t i; char *actual_path; @@ -181,9 +181,7 @@ static CURLcode file_connect(struct connectdata *conn, bool *done) return CURLE_URL_MALFORMAT; } - if(strncmp("\\\\", actual_path, 2)) - /* refuse to open path that starts with two backslashes */ - fd = open_readonly(actual_path, O_RDONLY|O_BINARY); + fd = open_readonly(actual_path, O_RDONLY|O_BINARY); file->path = actual_path; #else if(memchr(real_path, 0, real_path_len)) { |