Directory delete: 1) show which directory is being removed when going through a tree recursively. 2) allow the user to abort while deleting.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11767 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Peter D'Hoye 2006-12-14 22:43:16 +00:00
parent e84837558b
commit e21e87a2d0

View file

@ -427,6 +427,11 @@ static int remove_dir(char* dirname, int len)
!strcmp((char *)entry->d_name, ".."))
continue; /* skip these */
/* inform the user which dir we're deleting */
lcd_puts(0,1,dirname);
#ifdef HAVE_LCD_BITMAP
lcd_update();
#endif
result = remove_dir(dirname, len); /* recursion */
if (result)
break; /* or better continue, delete what we can? */
@ -435,6 +440,12 @@ static int remove_dir(char* dirname, int len)
{ /* remove a file */
result = remove(dirname);
}
if(ACTION_STD_CANCEL == get_action(CONTEXT_STD,TIMEOUT_NOBLOCK))
{
gui_syncsplash(HZ, true, str(LANG_MENU_SETTING_CANCEL));
result = -1;
break;
}
}
closedir(dir);