[vlc-devel] commit: playlist_art: blacklist some forbidden char for windows. ( Rémi Duraffort )

git version control git at videolan.org
Tue Mar 31 18:07:11 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Mar 31 18:01:46 2009 +0200| [cf0904ee0945b6452ee40822cd80958fc3ced72f] | committer: Rémi Duraffort 

playlist_art: blacklist some forbidden char for windows.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf0904ee0945b6452ee40822cd80958fc3ced72f
---

 src/playlist/art.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/playlist/art.c b/src/playlist/art.c
index aa6987a..7a82360 100644
--- a/src/playlist/art.c
+++ b/src/playlist/art.c
@@ -75,6 +75,11 @@ static char *ArtCacheGetSanitizedFileName( const char *psz )
     {
         if( dup[i] == DIR_SEP_CHAR )
             dup[i] = ' ';
+        // "<>:\"/?*" are forbidden for win filenames
+#if defined( WIN32 ) || defined( UNDER_CE )
+        else if( strchr( "<>:\"/?*", dup[i] ) )
+            dup[i] = '_';
+#endif
     }
     return dup;
 }




More information about the vlc-devel mailing list