tag editor: fix locating a song

This commit is contained in:
Andrzej Rybczak
2010-05-18 15:47:20 +02:00
parent 3d41a1585c
commit d2cde15622

View File

@@ -867,7 +867,7 @@ void TagEditor::LocateSong(const MPD::Song &s)
if (itsBrowsedDir != s.GetDirectory())
{
itsBrowsedDir = s.GetDirectory();
itsBrowsedDir = itsBrowsedDir.substr(0, itsBrowsedDir.find('/'));
itsBrowsedDir = itsBrowsedDir.substr(0, itsBrowsedDir.rfind('/'));
if (itsBrowsedDir.empty())
itsBrowsedDir = "/";
Dirs->Clear();