fix #1362 (replace ':' with '_' in filenames on macosx)
authorRafaël Carré <funman@videolan.org>
Wed, 16 Jan 2008 15:41:35 +0000 (15:41 +0000)
committerRafaël Carré <funman@videolan.org>
Wed, 16 Jan 2008 15:41:35 +0000 (15:41 +0000)
src/text/strings.c

index 9e0dc45..5dc80d7 100644 (file)
@@ -996,7 +996,9 @@ void filename_sanitize( char *str )
         switch( *str )
         {
             case '/':
-#ifdef WIN32
+#if defined( __APPLE__ )
+            case ':':
+#elif defined( WIN32 )
             case '\\':
             case '*':
             case '"':
@@ -1031,7 +1033,10 @@ void path_sanitize( char *str )
 #endif
     while( *str )
     {
-#ifdef WIN32
+#if defined( __APPLE__ )
+        if( *str == ':' )
+            *str = '_';
+#elif defined( WIN32 )
         switch( *str )
         {
             case '*':