~ubuntu-branches/ubuntu/gutsy/curl/gutsy

« back to all changes in this revision

Viewing changes to lib/file.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-06-29 15:04:24 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060629150424-pn00qumt9sml8p4m
Tags: 7.15.4-1ubuntu1
Synchronize to Debian. Only change left: Removal of stunnel and
libdb4.2-dev build dependencies.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * Copyright (C) 1998 - 2005, Daniel Stenberg, <daniel@haxx.se>, et al.
 
8
 * Copyright (C) 1998 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
9
9
 *
10
10
 * This software is licensed as described in the file COPYING, which
11
11
 * you should have received as part of this distribution. The terms
18
18
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
 * KIND, either express or implied.
20
20
 *
21
 
 * $Id: file.c,v 1.72 2005/12/01 23:42:03 bagder Exp $
 
21
 * $Id: file.c,v 1.76 2006-05-04 22:39:47 bagder Exp $
22
22
 ***************************************************************************/
23
23
 
24
24
#include "setup.h"
37
37
#include <sys/stat.h>
38
38
#endif
39
39
 
40
 
#include <errno.h>
41
 
 
42
40
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
43
41
#include <time.h>
44
42
#include <io.h>
102
100
 */
103
101
CURLcode Curl_file_connect(struct connectdata *conn)
104
102
{
105
 
  char *real_path = curl_unescape(conn->path, 0);
 
103
  char *real_path = curl_easy_unescape(conn->data, conn->path, 0, NULL);
106
104
  struct FILEPROTO *file;
107
105
  int fd;
108
106
#if defined(WIN32) || defined(MSDOS) || defined(__EMX__)
230
228
    if(res)
231
229
      break;
232
230
 
 
231
    if (readcount <= 0)  /* fix questionable compare error. curlvms */
 
232
      break;
 
233
 
233
234
    nread = (size_t)readcount;
234
235
 
235
 
    if (nread <= 0)
236
 
      break;
237
 
 
238
236
    /* write the data to the target */
239
237
    nwrite = fwrite(buf, 1, nread, fp);
240
238
    if(nwrite != nread) {