summaryrefslogtreecommitdiffstats
path: root/player/configfiles.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-25 20:31:48 +0100
committerwm4 <wm4@nowhere>2014-02-25 20:36:31 +0100
commit2ea614ada6d31d2f9cebf7ea4eda05105b35e41d (patch)
tree50e2d38dcbaf9683e61bed5703caea020797923b /player/configfiles.c
parent90b4923f4abef6d34a3abef3b416a364338ad67e (diff)
downloadmpv-2ea614ada6d31d2f9cebf7ea4eda05105b35e41d.tar.bz2
mpv-2ea614ada6d31d2f9cebf7ea4eda05105b35e41d.tar.xz
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.
Diffstat (limited to 'player/configfiles.c')
-rw-r--r--player/configfiles.c16
1 files changed, 3 insertions, 13 deletions
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: