[MPlayer-cvslog] r29604 - trunk/mplayer.c

reimar subversion at mplayerhq.hu
Mon Aug 31 12:07:45 CEST 2009


Author: reimar
Date: Mon Aug 31 12:07:44 2009
New Revision: 29604

Log:
Fix per-file config file loading for DOS paths (i.e. where \ and : can
also separate path and file name).

Modified:
   trunk/mplayer.c

Modified: trunk/mplayer.c
==============================================================================
--- trunk/mplayer.c	Mon Aug 31 11:48:25 2009	(r29603)
+++ trunk/mplayer.c	Mon Aug 31 12:07:44 2009	(r29604)
@@ -938,7 +938,16 @@ static void load_per_file_config (m_conf
     if (use_filedir_conf && try_load_config(conf, cfg))
 	return;
 
-    if ((name = strrchr (cfg, '/')) == NULL)
+    name = strrchr(cfg, '/');
+    if (HAVE_DOS_PATHS) {
+        char *tmp = strrchr(cfg, '\\');
+        if (!name || tmp > name)
+            name = tmp;
+        tmp = strrchr(cfg, ':');
+        if (!name || tmp > name)
+            name = tmp;
+    }
+    if (!name)
 	name = cfg;
     else
 	name++;


More information about the MPlayer-cvslog mailing list