From efdf0e5fc7ebb4c851f4905bd6f3d616da6ae6d7 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 31 Aug 2009 10:07:44 +0000 Subject: Fix per-file config file loading for DOS paths (i.e. where \ and : can also separate path and file name). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29604 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mplayer.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 2785346529..49f2190bf9 100644 --- a/mplayer.c +++ b/mplayer.c @@ -938,7 +938,16 @@ static void load_per_file_config (m_config_t* conf, const char *const file) 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++; -- cgit v1.2.3