# HG changeset patch # User reimar # Date 1251713264 0 # Node ID 647445e4999e0ccc32c34f32c66e5fdb9227205c # Parent 82ff5f35918a1485b987d688a9963957751b25ce Fix per-file config file loading for DOS paths (i.e. where \ and : can also separate path and file name). diff -r 82ff5f35918a -r 647445e4999e mplayer.c --- a/mplayer.c Mon Aug 31 09:48:25 2009 +0000 +++ b/mplayer.c Mon Aug 31 10:07:44 2009 +0000 @@ -938,7 +938,16 @@ 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++;