mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 03:39:59 +00:00
command_event_save_config - check if config_path is empty
This commit is contained in:
parent
a42d5c9ec8
commit
e5f9c4d713
16
command.c
16
command.c
@ -1467,21 +1467,21 @@ static bool command_event_save_auto_state(void)
|
||||
static bool command_event_save_config(const char *config_path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (config_save_file(config_path))
|
||||
if (string_is_empty(config_path) || !config_save_file(config_path))
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO),
|
||||
msg_hash_to_str(MSG_FAILED_SAVING_CONFIG_TO),
|
||||
path_get(RARCH_PATH_CONFIG));
|
||||
RARCH_LOG("%s\n", s);
|
||||
return true;
|
||||
RARCH_ERR("%s\n", s);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_FAILED_SAVING_CONFIG_TO),
|
||||
msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO),
|
||||
path_get(RARCH_PATH_CONFIG));
|
||||
RARCH_ERR("%s\n", s);
|
||||
|
||||
return false;
|
||||
RARCH_LOG("%s\n", s);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user