From 2a6f9aa155cc9ecd1fdf09cd9ca4badbb4a30019 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <daniel@haxx.se>
Date: Tue, 6 Jul 2004 15:16:05 +0000
Subject: [PATCH] Andres Garcia pointed out that we searched for a slash badly
 since it is converted and thus we must search for backslash on windows

---
 lib/file.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/file.c b/lib/file.c
index c8315ae46a..20cb918eb6 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -180,10 +180,16 @@ CURLcode Curl_file_done(struct connectdata *conn,
   return CURLE_OK;
 }
 
+#if defined(WIN32) || defined(__EMX__)
+#define DIRSEP '\\'
+#else
+#define DIRSEP '/'
+#endif
+
 static CURLcode file_upload(struct connectdata *conn)
 {
   struct FILEPROTO *file = conn->proto.file;
-  char *dir = strchr(file->path, '/');
+  char *dir = strchr(file->path, DIRSEP);
   FILE *fp;
   CURLcode res=CURLE_OK;
   struct SessionHandle *data = conn->data;
-- 
GitLab