Mercurial > mplayer.hg
changeset 29562:647445e4999e
Fix per-file config file loading for DOS paths (i.e. where \ and : can
also separate path and file name).
author | reimar |
---|---|
date | Mon, 31 Aug 2009 10:07:44 +0000 |
parents | 82ff5f35918a |
children | 0ba024eac67c |
files | mplayer.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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++;