From 690b72947457617a2f98972e21f2c611ba90bdc5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 25 Apr 2017 16:38:47 +0200 Subject: [PATCH] config_save_autoconf_profile - cleanup --- configuration.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configuration.c b/configuration.c index b5d94344d2..5736017659 100644 --- a/configuration.c +++ b/configuration.c @@ -2877,10 +2877,11 @@ bool config_save_autoconf_profile(const char *path, unsigned user) bool ret = false; config_file_t *conf = NULL; settings_t *settings = config_get_ptr(); + const char *autoconf_dir = settings->directory.autoconfig; buf[0] = autoconf_file[0] = '\0'; - fill_pathname_join(buf, settings->directory.autoconfig, + fill_pathname_join(buf, autoconf_dir, settings->input.joypad_driver, sizeof(buf)); if(path_is_directory(buf)) @@ -2897,7 +2898,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user) } else { - fill_pathname_join(buf, settings->directory.autoconfig, + fill_pathname_join(buf, autoconf_dir, path, sizeof(buf)); fill_pathname_noext(autoconf_file, buf, file_path_str(FILE_PATH_CONFIG_EXTENSION),