X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fconf.c;h=814a13b774486e2e204ee1d8bc61aba2ea12f8c6;hb=aef88fd9eb8d3969ad4352f17b6532195d30771d;hp=1f1f0bc39f0754b3cd847b2f327ffc6b04ab85db;hpb=fb6ffa422091277d7116fb059b23424ad9376777;p=ncmpc.git diff --git a/src/conf.c b/src/conf.c index 1f1f0bc..814a13b 100644 --- a/src/conf.c +++ b/src/conf.c @@ -1,5 +1,5 @@ /* ncmpc (Ncurses MPD Client) - * (c) 2004-2010 The Music Player Daemon Project + * (c) 2004-2017 The Music Player Daemon Project * Project homepage: http://musicpd.org * * This program is free software; you can redistribute it and/or modify @@ -501,11 +501,8 @@ parse_line(char *line) g_free(options.scroll_sep); options.scroll_sep = get_format(value); } else if (!strcasecmp(CONF_DISPLAY_TIME, name)) -#ifdef NCMPC_MINI + /* obsolete, ignore */ {} -#else - options.display_time = str2bool(value); -#endif else if (!strcasecmp(CONF_JUMP_PREFIX_ONLY, name)) #ifdef NCMPC_MINI {} @@ -582,19 +579,19 @@ read_rc_file(char *filename) return 0; } -int +bool check_user_conf_dir(void) { char *directory = g_build_filename(g_get_home_dir(), "." PACKAGE, NULL); if (g_file_test(directory, G_FILE_TEST_IS_DIR)) { g_free(directory); - return 0; + return true; } - int retval = g_mkdir(directory, 0755); + bool success = g_mkdir(directory, 0755) == 0; g_free(directory); - return retval; + return success; } char *