From: KO Myung-Hun Date: Fri, 14 Oct 2011 13:08:54 +0000 (+0900) Subject: Convert '/' to '\' on OS/2 X-Git-Tag: 1.2.0-pre1~182 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=dbc8ad47443d452c8dd7b5d847cb8955ccc618be;p=vlc Convert '/' to '\' on OS/2 This allows a mixed usage of '\' and '/'. Signed-off-by: RĂ©mi Denis-Courmont --- diff --git a/src/text/strings.c b/src/text/strings.c index d5cae97079..0e5de0fa9d 100644 --- a/src/text/strings.c +++ b/src/text/strings.c @@ -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] == ':'))