[vlc-devel] [PATCH 11/18] Return drive-letter path even though it is not started with '\' on OS/2.

KO Myung-Hun komh at chollian.net
Thu Oct 20 14:30:18 CEST 2011


This fixes the problem dvd://x:, vcd://x: and so on are not processed
correctly.
---
 src/text/strings.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/text/strings.c b/src/text/strings.c
index 0e5de0f..78f25a3 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -1232,6 +1232,11 @@ char *make_path (const char *url)
         /* Local path disguised as a remote one */
         if (!strncasecmp (path, "localhost\\", 10))
             return memmove (path, path + 10, strlen (path + 10) + 1);
+#ifdef __OS2__
+        /* Drive letter ? */
+        if (isalpha (*path) && *(path + 1) == ':' && *(path + 2) == '\0')
+            return path;
+#endif
         /* UNC path */
         if (*path && asprintf (&ret, "\\\\%s", path) == -1)
             ret = NULL;
-- 
1.7.3.2



More information about the vlc-devel mailing list