Author: jbevain
Date: 2007-10-01 19:30:57 -0400 (Mon, 01 Oct 2007)
New Revision: 86728

Modified:
   trunk/moon/src/ChangeLog
   trunk/moon/src/playlist.cpp
Log:
2007-10-02  Jb Evain  <[EMAIL PROTECTED]>

        * playlist.cpp: deal with non lowercase file exts.



Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2007-10-01 22:18:53 UTC (rev 86727)
+++ trunk/moon/src/ChangeLog    2007-10-01 23:30:57 UTC (rev 86728)
@@ -1,3 +1,7 @@
+2007-10-02  Jb Evain  <[EMAIL PROTECTED]>
+
+       * playlist.cpp: deal with non lowercase file exts.
+
 2007-10-01  Jeffrey Stedfast  <[EMAIL PROTECTED]>
 
        * font.cpp: Reduced Glyph table memory usage.

Modified: trunk/moon/src/playlist.cpp
===================================================================
--- trunk/moon/src/playlist.cpp 2007-10-01 22:18:53 UTC (rev 86727)
+++ trunk/moon/src/playlist.cpp 2007-10-01 23:30:57 UTC (rev 86728)
@@ -69,10 +69,8 @@
 
        OpenEntry (dynamic_cast<PlaylistEntry *> (current_entry->next));
 
-       if (!HasMediaSource ())
-               return;
-
-       Play ();
+       if (HasMediaSource ())
+               Play ();
 }
 
 void
@@ -101,13 +99,21 @@
 {
        static const char *exts [] = {".asx", ".wax", ".wvx", ".wmx"};
 
+       char *file_name_lower; 
+
        if (!file_name)
                return false;
 
-       for (int i = 0; i < 4; i++)
-               if (g_str_has_suffix (file_name, exts [i]))
+       file_name_lower = g_ascii_strdown (file_name, -1);
+
+       for (int i = 0; i < 4; i++) {
+               if (g_str_has_suffix (file_name_lower, exts [i])) {
+                       g_free (file_name_lower);
                        return true;
+               }
+       }
 
+       g_free (file_name_lower);
        return false;
 }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to