From e9963139da692b29e4e621e52af9107831bb8f44 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 May 2015 16:43:22 +0200 Subject: path: improve verbose logging --- options/path.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'options') diff --git a/options/path.c b/options/path.c index 4150a72a3f..08d16fe944 100644 --- a/options/path.c +++ b/options/path.c @@ -99,7 +99,7 @@ char *mp_find_user_config_file(void *talloc_ctx, struct mpv_global *global, if (res) res = mp_path_join(talloc_ctx, res, filename); talloc_free(tmp); - MP_VERBOSE(global, "config file: '%s' -> '%s'\n", filename, res ? res : "-"); + MP_VERBOSE(global, "config path: '%s' -> '%s'\n", filename, res ? res : "-"); return res; } @@ -119,8 +119,14 @@ static char **mp_find_all_config_files_limited(void *talloc_ctx, bstr_split_tok(s, "|", &fn, &s); char *file = mp_path_join_bstr(ret, bstr0(dir), fn); - if (mp_path_exists(file)) + if (mp_path_exists(file)) { + MP_VERBOSE(global, "config path: '%.*s' -> '%s'\n", + BSTR_P(fn), file); MP_TARRAY_APPEND(NULL, ret, num_ret, file); + } else { + MP_VERBOSE(global, "config path: '%.*s' -/-> '%s'\n", + BSTR_P(fn), file); + } } } @@ -129,12 +135,6 @@ static char **mp_find_all_config_files_limited(void *talloc_ctx, for (int n = 0; n < num_ret / 2; n++) MPSWAP(char*, ret[n], ret[num_ret - n - 1]); - - MP_VERBOSE(global, "config file: '%s'\n", filename); - - for (char** c = ret; *c; c++) - MP_VERBOSE(global, " -> '%s'\n", *c); - return ret; } -- cgit v1.2.3