]> git.sesse.net Git - vlc/commitdiff
Convert '/' to '\' on OS/2
authorKO Myung-Hun <komh@chollian.net>
Fri, 14 Oct 2011 13:08:54 +0000 (22:08 +0900)
committerRémi Denis-Courmont <remi@remlab.net>
Fri, 14 Oct 2011 15:00:37 +0000 (18:00 +0300)
This allows a mixed usage of '\' and '/'.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
src/text/strings.c

index d5cae970797d7900e966464b0384ba0a10e02a9c..0e5de0fa9df237801b9579f03dbc5b3c2be60058 100644 (file)
@@ -1075,6 +1075,17 @@ char *make_URI (const char *path, const char *scheme)
      * scheme name (such as mailto: or news:). */
 
     char *buf;
+
+#ifdef __OS2__
+    char p[strlen (path) + 1];
+
+    for (buf = p; *path; buf++, path++)
+        *buf = (*path == '/') ? DIR_SEP_CHAR : *path;
+    *buf = '\0';
+
+    path = p;
+#endif
+
 #if defined( WIN32 ) || defined( __OS2__ )
     /* Drive letter */
     if (isalpha ((unsigned char)path[0]) && (path[1] == ':'))