aboutsummaryrefslogtreecommitdiffhomepage
path: root/osdep
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-10-23 10:51:51 +0200
committerGravatar wm4 <wm4@nowhere>2014-10-23 10:51:51 +0200
commit34373032b516e54843f673377bf89f506a303092 (patch)
tree39465303908819eb3aa5bea07e6a74327c0ac73a /osdep
parent474461244e354c6f84b836aeb94dfaa44de0eed8 (diff)
win32: change config path priorities
Assume mpv.exe is located in $mpv_exe_dir, then config files were preferably loaded from "$mpv_exe_dir/mpv". This was mostly traditional, and inherited from MPlayer times. Reverse the config path priority order, and prefer $CSIDL_APPDATA/mpv as main config path. This also fixes behavior when writing watch_later configs, and mpv is installed in a not-writable path. It's possible that this will cause regressions for some users, if the change in preference suddenly prefers stale config files (which may happen to longer around in the appdata config dir) over the user's proper config. Also explicitly document the behavior.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/path-win.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/osdep/path-win.c b/osdep/path-win.c
index c6560233f5..66d8de96e4 100644
--- a/osdep/path-win.c
+++ b/osdep/path-win.c
@@ -61,11 +61,11 @@ static char *mp_get_win_app_dir(void *talloc_ctx)
int mp_add_win_config_dirs(struct mpv_global *global, char **dirs, int i)
{
void *talloc_ctx = dirs;
- if ((dirs[i] = mp_get_win_exe_subdir(talloc_ctx)))
+ if ((dirs[i] = mp_get_win_app_dir(talloc_ctx)))
i++;
if ((dirs[i] = mp_get_win_exe_dir(talloc_ctx)))
i++;
- if ((dirs[i] = mp_get_win_app_dir(talloc_ctx)))
+ if ((dirs[i] = mp_get_win_exe_subdir(talloc_ctx)))
i++;
return i;
}