use path_append for setting directories is several settings

sprintf, strcpy, memccpy can all just go thru path_append
with the added benefit of some path sanitizing too

Change-Id: I33510b56a364b8b3a0b06f2ff14b76491f6e3870
This commit is contained in:
William Wilgus 2024-03-31 22:08:55 -04:00
parent 47784a777e
commit 1dc22c7241
7 changed files with 23 additions and 22 deletions

View file

@ -193,7 +193,8 @@ MENUITEM_SETTING(browse_current, &global_settings.browse_current, NULL);
MENUITEM_SETTING(show_path_in_browser, &global_settings.show_path_in_browser, NULL);
static int clear_start_directory(void)
{
strcpy(global_settings.start_directory, "/");
path_append(global_settings.start_directory, PATH_ROOTSTR,
PA_SEP_HARD, sizeof(global_settings.start_directory));
settings_save();
splash(HZ, ID2P(LANG_RESET_DONE_CLEAR));
return false;