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
This commit is contained in:
reimar 2009-08-31 10:07:44 +00:00
parent a0eda318e8
commit efdf0e5fc7
1 changed files with 10 additions and 1 deletions

View File

@ -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++;