From 34373032b516e54843f673377bf89f506a303092 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 23 Oct 2014 10:51:51 +0200 Subject: 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. --- osdep/path-win.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'osdep') 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; } -- cgit v1.2.3