diff options
author | nikita <nikita@n0.is> | 2020-04-30 14:57:43 +0200 |
---|---|---|
committer | nikita <nikita@n0.is> | 2020-04-30 14:57:43 +0200 |
commit | e78a29c1d7e4c0d9d5d2400f8935fe6c6db9852e (patch) | |
tree | fcebec99976dae264a75fccabd555af2ac77b4ad /lib/file.c | |
parent | 55ddc65827f8424ef1c6fe592da07608237cf2ae (diff) | |
parent | 53cdc2c963e33bc0cc1a51ad2df79396202e07f8 (diff) | |
download | gnurl-e78a29c1d7e4c0d9d5d2400f8935fe6c6db9852e.tar.gz gnurl-e78a29c1d7e4c0d9d5d2400f8935fe6c6db9852e.tar.bz2 gnurl-e78a29c1d7e4c0d9d5d2400f8935fe6c6db9852e.zip |
Merge tag 'curl-7_70_0'
7.70.0
Diffstat (limited to 'lib/file.c')
-rw-r--r-- | lib/file.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/file.c b/lib/file.c index 43e1ad001..bb3923989 100644 --- a/lib/file.c +++ b/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)) { |