summaryrefslogtreecommitdiff
path: root/lib/file.c
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2004-11-09 14:57:11 +0000
committerGisle Vanem <gvanem@broadpark.no>2004-11-09 14:57:11 +0000
commit865e495188a07a1b1fd4b32b172730c8d5cd707b (patch)
treebc176d1a8dcfc15ce49dc6d18b53d4bd02934f74 /lib/file.c
parentd3c0ed007e4543eca3d9dd4ab92683152cdc6a52 (diff)
downloadcurl-865e495188a07a1b1fd4b32b172730c8d5cd707b.tar.gz
Handle drive-letter on MS-DOS.
Diffstat (limited to 'lib/file.c')
-rw-r--r--lib/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/file.c b/lib/file.c
index 7831d2ef2..de1e89c59 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -104,7 +104,7 @@ CURLcode Curl_file_connect(struct connectdata *conn)
char *real_path = curl_unescape(conn->path, 0);
struct FILEPROTO *file;
int fd;
-#if defined(WIN32) || defined(__EMX__)
+#if defined(WIN32) || defined(MSDOS) || defined(__EMX__)
int i;
char *actual_path;
#endif
@@ -120,7 +120,7 @@ CURLcode Curl_file_connect(struct connectdata *conn)
conn->proto.file = file;
-#if defined(WIN32) || defined(__EMX__)
+#if defined(WIN32) || defined(MSDOS) || defined(__EMX__)
/* If the first character is a slash, and there's
something that looks like a drive at the beginning of
the path, skip the slash. If we remove the initial
@@ -144,7 +144,7 @@ CURLcode Curl_file_connect(struct connectdata *conn)
actual_path++;
}
- /* change path separators from '/' to '\\' for Windows and OS/2 */
+ /* change path separators from '/' to '\\' for DOS, Windows and OS/2 */
for (i=0; actual_path[i] != '\0'; ++i)
if (actual_path[i] == '/')
actual_path[i] = '\\';
@@ -184,7 +184,7 @@ CURLcode Curl_file_done(struct connectdata *conn,
return CURLE_OK;
}
-#if defined(WIN32) || defined(__EMX__)
+#if defined(WIN32) || defined(MSDOS) || defined(__EMX__)
#define DIRSEP '\\'
#else
#define DIRSEP '/'