aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2007-10-23 15:16:46 +0000
committerYang Tse <yangsita@gmail.com>2007-10-23 15:16:46 +0000
commitb9a305983fad324a722f8865a4f4d22535ab6c84 (patch)
tree2f473ce6bc7d3f5d64dce6e3342ff5b1924ef7d8 /lib
parent8e7da9464a847820adff261907885ac5770ac81a (diff)
File is not a protocol that can deal with "persistancy"
Diffstat (limited to 'lib')
-rw-r--r--lib/file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/file.c b/lib/file.c
index bce92bd2a..0bc0e4942 100644
--- a/lib/file.c
+++ b/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