mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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:
parent
47784a777e
commit
1dc22c7241
7 changed files with 23 additions and 22 deletions
|
|
@ -63,6 +63,7 @@
|
|||
#include "list.h"
|
||||
#include "viewport.h"
|
||||
#include "exported_menus.h"
|
||||
#include "pathfuncs.h"
|
||||
|
||||
static bool no_source_in_menu = false;
|
||||
static int recmenu_callback(int action,
|
||||
|
|
@ -305,7 +306,8 @@ MENUITEM_SETTING(rec_prerecord_time, &global_settings.rec_prerecord_time, NULL);
|
|||
|
||||
static int clear_rec_directory(void)
|
||||
{
|
||||
strcpy(global_settings.rec_directory, REC_BASE_DIR);
|
||||
path_append(global_settings.rec_directory, REC_BASE_DIR,
|
||||
PA_SEP_HARD, sizeof(global_settings.rec_directory));
|
||||
settings_save();
|
||||
splash(HZ, ID2P(LANG_RESET_DONE_CLEAR));
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue