From b6feecb6c12566e9ea826cb67701008f9e423eea Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Sun, 25 Mar 2018 12:00:29 -0700 Subject: Make sure config directory exists before trying to save config file --HG-- branch : nuklear_ui --- config.c | 1 + 1 file changed, 1 insertion(+) (limited to 'config.c') diff --git a/config.c b/config.c index 71a31f4..14cf5b8 100644 --- a/config.c +++ b/config.c @@ -250,6 +250,7 @@ void persist_config(tern_node *config) if (!confdir) { fatal_error("Failed to locate config file directory\n"); } + ensure_dir_exists(confdir); char *confpath = path_append(confdir, "blastem.cfg"); if (!serialize_config_file(config, confpath)) { fatal_error("Failed to write config to %s\n", confpath); -- cgit v1.2.3