actions: add missing flag restriction for physical deletion

This commit is contained in:
Andrzej Rybczak
2014-08-27 02:01:44 +02:00
parent 1fc2ce2d3c
commit 8d1b10fb3e
6 changed files with 25 additions and 1 deletions

View File

@@ -543,6 +543,8 @@ void Browser::ChangeBrowseMode()
bool Browser::deleteItem(const MPD::Item &item, std::string &errmsg)
{
if (!Config.allow_for_physical_item_deletion)
FatalError("Browser::deleteItem invoked with allow_for_physical_item_deletion = false");
if (isParentDirectory((item)))
FatalError("Parent directory passed to Browser::deleteItem");