summaryrefslogtreecommitdiff
path: root/apps/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.c')
-rw-r--r--apps/tree.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 1939c7ee05..23a909281d 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -383,7 +383,7 @@ static int update_dir(void)
383 { 383 {
384 if (ft_load(&tc, NULL) < 0) 384 if (ft_load(&tc, NULL) < 0)
385 return -1; 385 return -1;
386 strlcpy(lastdir, tc.currdir, MAX_PATH); 386 strmemccpy(lastdir, tc.currdir, MAX_PATH);
387 changed = true; 387 changed = true;
388 } 388 }
389 } 389 }
@@ -573,7 +573,7 @@ void set_current_file(const char *path)
573 name = strrchr(path+1,'/'); 573 name = strrchr(path+1,'/');
574 if (name) 574 if (name)
575 { 575 {
576 strlcpy(tc.currdir, path, name - path + 1); 576 strmemccpy(tc.currdir, path, name - path + 1);
577 name++; 577 name++;
578 } 578 }
579 else 579 else
@@ -582,7 +582,7 @@ void set_current_file(const char *path)
582 name = path+1; 582 name = path+1;
583 } 583 }
584 584
585 strlcpy(lastfile, name, MAX_PATH); 585 strmemccpy(lastfile, name, MAX_PATH);
586 586
587 587
588 /* If we changed dir we must recalculate the dirlevel 588 /* If we changed dir we must recalculate the dirlevel
@@ -1007,7 +1007,7 @@ int rockbox_browse(struct browse_context *browse)
1007 tc.selected_item = 0; 1007 tc.selected_item = 0;
1008 tc.dirlevel = 0; 1008 tc.dirlevel = 0;
1009 1009
1010 strlcpy(tc.currdir, browse->root, sizeof(tc.currdir)); 1010 strmemccpy(tc.currdir, browse->root, sizeof(tc.currdir));
1011 } 1011 }
1012 1012
1013 start_wps = false; 1013 start_wps = false;
@@ -1030,7 +1030,7 @@ int rockbox_browse(struct browse_context *browse)
1030 if (dirfilter != SHOW_ID3DB) 1030 if (dirfilter != SHOW_ID3DB)
1031 tc.dirfilter = &global_settings.dirfilter; 1031 tc.dirfilter = &global_settings.dirfilter;
1032 tc.browse = browse; 1032 tc.browse = browse;
1033 strlcpy(current, browse->root, MAX_PATH); 1033 strmemccpy(current, browse->root, MAX_PATH);
1034 set_current_file(current); 1034 set_current_file(current);
1035 if (browse->flags&BROWSE_RUNFILE) 1035 if (browse->flags&BROWSE_RUNFILE)
1036 ret_val = ft_enter(&tc); 1036 ret_val = ft_enter(&tc);