mirror of https://github.com/mpv-player/mpv
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:
parent
a0eda318e8
commit
efdf0e5fc7
11
mplayer.c
11
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++;
|
||||
|
|
Loading…
Reference in New Issue