mirror of
https://github.com/curl/curl.git
synced 2026-08-05 05:06:13 +03:00
File is not a protocol that can deal with "persistancy"
This commit is contained in:
parent
8e7da9464a
commit
b9a305983f
1 changed files with 10 additions and 0 deletions
10
lib/file.c
10
lib/file.c
|
|
@ -149,6 +149,16 @@ CURLcode Curl_file_connect(struct connectdata *conn)
|
|||
}
|
||||
data->reqdata.proto.file = file;
|
||||
}
|
||||
else {
|
||||
/* file is not a protocol that can deal with "persistancy" */
|
||||
file = data->reqdata.proto.file;
|
||||
Curl_safefree(file->freepath);
|
||||
if(file->fd != -1)
|
||||
close(file->fd);
|
||||
file->path = NULL;
|
||||
file->freepath = NULL;
|
||||
file->fd = -1;
|
||||
}
|
||||
|
||||
#if defined(WIN32) || defined(MSDOS) || defined(__EMX__)
|
||||
/* If the first character is a slash, and there's
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue