summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelevengu <enhasa@live.com>2014-02-12 18:54:54 -0500
committerwm4 <wm4@nowhere>2014-03-11 00:10:20 +0100
commit717cdeb95da654f812bf7ee8e228e53ea3284ab4 (patch)
treec6d8466a30bd748d3858db45faf3505e933f9d6c
parent315f3a921812931d5dd7e35a22c233c8d21be426 (diff)
downloadmpv-717cdeb95da654f812bf7ee8e228e53ea3284ab4.tar.bz2
mpv-717cdeb95da654f812bf7ee8e228e53ea3284ab4.tar.xz
win32: restore support for exe directory as config directory
Same rationale as b2c2fe7a but updated to work with path-win.c Signed-off-by: wm4 <wm4@nowhere> Merges/closes #543.
-rw-r--r--osdep/path-win.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/osdep/path-win.c b/osdep/path-win.c
index d89adc755e..2b1e8b5144 100644
--- a/osdep/path-win.c
+++ b/osdep/path-win.c
@@ -59,7 +59,11 @@ char *mp_get_win_config_path(const char *filename)
res = mp_path_join(NULL, bstr0(temp), bstr0(filename));
if (!mp_path_exists(res) || mp_path_isdir(res)) {
talloc_free(res);
- res = NULL;
+ res = mp_path_join(NULL, bstr0(dir), bstr0(filename));
+ if (!mp_path_exists(res) || mp_path_isdir(res)) {
+ talloc_free(res);
+ res = NULL;
+ }
}
}