summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/tree.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 29ca4dfe15..d009f4eb68 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -540,7 +540,7 @@ static int showdir(char *path, int start)
540 return filesindir; 540 return filesindir;
541} 541}
542 542
543static bool ask_resume(void) 543static bool ask_resume(bool ask_once)
544{ 544{
545#ifdef HAVE_LCD_CHARCELLS 545#ifdef HAVE_LCD_CHARCELLS
546 lcd_double_height(false); 546 lcd_double_height(false);
@@ -571,7 +571,7 @@ static bool ask_resume(void)
571 break; 571 break;
572 } 572 }
573 573
574 if ( global_settings.resume == RESUME_ASK_ONCE) { 574 if ( global_settings.resume == RESUME_ASK_ONCE && ask_once) {
575 global_settings.resume_index = -1; 575 global_settings.resume_index = -1;
576 settings_save(); 576 settings_save();
577 } 577 }
@@ -613,7 +613,7 @@ void reload_directory(void)
613 reload_dir = true; 613 reload_dir = true;
614} 614}
615 615
616static void start_resume(void) 616static void start_resume(bool ask_once)
617{ 617{
618 if ( global_settings.resume && 618 if ( global_settings.resume &&
619 global_settings.resume_index != -1 ) { 619 global_settings.resume_index != -1 ) {
@@ -621,7 +621,7 @@ static void start_resume(void)
621 global_settings.resume_index, 621 global_settings.resume_index,
622 global_settings.resume_offset); 622 global_settings.resume_offset);
623 623
624 if (!ask_resume()) 624 if (!ask_resume(ask_once))
625 return; 625 return;
626 626
627 if (playlist_resume() != -1) 627 if (playlist_resume() != -1)
@@ -817,7 +817,7 @@ static bool dirbrowse(char *root)
817 817
818 memcpy(currdir,root,sizeof(currdir)); 818 memcpy(currdir,root,sizeof(currdir));
819 819
820 start_resume(); 820 start_resume(true);
821 821
822 numentries = showdir(currdir, dirstart); 822 numentries = showdir(currdir, dirstart);
823 if (numentries == -1) 823 if (numentries == -1)
@@ -1159,6 +1159,11 @@ static bool dirbrowse(char *root)
1159#endif 1159#endif
1160 restore = true; 1160 restore = true;
1161 } 1161 }
1162 else
1163 {
1164 start_resume(false);
1165 restore = true;
1166 }
1162 } 1167 }
1163 break; 1168 break;
1164 1169