From 2ea614ada6d31d2f9cebf7ea4eda05105b35e41d Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 25 Feb 2014 20:31:48 +0100 Subject: config: don't write default config file This created an essentially empty config file. This is not really needed and probably causes more trouble than it solves (such as littering the home directory with crap), so get rid of it. --- player/configfiles.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'player/configfiles.c') diff --git a/player/configfiles.c b/player/configfiles.c index e211f9b341..cc5659fa18 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -44,8 +44,6 @@ #include "core.h" #include "command.h" -#define DEF_CONFIG "# Write your default config options here!\n\n\n" - bool mp_parse_cfgfiles(struct MPContext *mpctx) { struct MPOpts *opts = mpctx->opts; @@ -71,17 +69,9 @@ bool mp_parse_cfgfiles(struct MPContext *mpctx) mp_mk_config_dir(mpctx->global, NULL); if (!(conffile = mp_find_user_config_file(tmp, mpctx->global, "config"))) MP_ERR(mpctx, "mp_find_user_config_file(\"config\") problem\n"); - else { - int fd = open(conffile, O_CREAT | O_EXCL | O_WRONLY | O_CLOEXEC, 0666); - if (fd != -1) { - MP_INFO(mpctx, "Creating config file: %s\n", conffile); - write(fd, DEF_CONFIG, sizeof(DEF_CONFIG) - 1); - close(fd); - } - if (m_config_parse_config_file(conf, conffile, 0) < 0) { - r = false; - goto done; - } + else if (m_config_parse_config_file(conf, conffile, 0) < 0) { + r = false; + goto done; } done: -- cgit v1.2.3