browser: if current dir doesn't exists, go down one level automatically

This commit is contained in:
Andrzej Rybczak
2010-08-10 00:11:44 +02:00
parent a93096fbda
commit 7c75be82bd
4 changed files with 18 additions and 0 deletions

View File

@@ -205,6 +205,11 @@ void NcmpcppErrorCallback(MPD::Connection *, int errorid, const char *msg, void
ShowMessage("Password accepted!");
wFooter->SetGetStringHelper(StatusbarGetStringHelper);
}
else if ((errorid >> 8) == MPD_SERVER_ERROR_NO_EXIST && myScreen == myBrowser)
{
myBrowser->GetDirectory(PathGoDownOneLevel(myBrowser->CurrentDir()));
myBrowser->Refresh();
}
else
ShowMessage("%s", msg);
}