browser: simplify function call

This commit is contained in:
Andrzej Rybczak
2012-09-11 23:09:20 +02:00
parent a9bee35cca
commit fb5b95cdce

View File

@@ -138,13 +138,7 @@ void Browser::EnterPressed()
case itDirectory:
{
if (isParentDirectory(item))
{
size_t slash = itsBrowsedDir.rfind("/");
if (slash != std::string::npos)
GetDirectory(itsBrowsedDir.substr(0, slash), itsBrowsedDir);
else
GetDirectory("/", itsBrowsedDir);
}
GetDirectory(getParentDirectory(itsBrowsedDir), itsBrowsedDir);
else
GetDirectory(item.name, itsBrowsedDir);
DrawHeader();