summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-08-31 10:07:44 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2009-08-31 10:07:44 +0000
commitefdf0e5fc7ebb4c851f4905bd6f3d616da6ae6d7 (patch)
tree38776cf040384f82122ca6e6421e82027487af82 /mplayer.c
parenta0eda318e8d4b6a2acf52928896fdd211af66f06 (diff)
downloadmpv-efdf0e5fc7ebb4c851f4905bd6f3d616da6ae6d7.tar.bz2
mpv-efdf0e5fc7ebb4c851f4905bd6f3d616da6ae6d7.tar.xz
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
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c11
1 files changed, 10 insertions, 1 deletions
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++;