Database: Disable delete hotkey unless audio file is selected
Fixes behavior where Rockbox would offer to delete nonexistent directories. Change-Id: I219da382b181372023b9408ac9a85189bffdcb74
This commit is contained in:
parent
b31127db7d
commit
31d56d4a59
1 changed files with 7 additions and 0 deletions
|
@ -1890,6 +1890,13 @@ static bool hotkey_delete_item(void)
|
||||||
if (selected_file_attr & ATTR_VOLUME)
|
if (selected_file_attr & ATTR_VOLUME)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_TAGCACHE
|
||||||
|
if (context == CONTEXT_ID3DB &&
|
||||||
|
(selected_file_attr & FILE_ATTR_MASK) != FILE_ATTR_AUDIO)
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
|
|
||||||
return delete_file_dir();
|
return delete_file_dir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue