Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed: Properly fallback to root in case getdirectory fails in Update…

…() + show error dialog (in line with a54cb0d)
  • Loading branch information...
commit 40224df639af30c4efde19a03c14ad00b26f03b9 1 parent 101c683
arnova authored
Showing with 5 additions and 8 deletions.
  1. +5 −8 xbmc/windows/GUIMediaWindow.cpp
View
13 xbmc/windows/GUIMediaWindow.cpp
@@ -777,16 +777,13 @@ bool CGUIMediaWindow::Update(const CStdString &strDirectory, bool updateFilterPa
if (!GetDirectory(directory, items))
{
CLog::Log(LOGERROR,"CGUIMediaWindow::GetDirectory(%s) failed", strDirectory.c_str());
- // if the directory is the same as the old directory, then we'll return
- // false. Else, we assume we can get the previous directory
- if (strDirectory.Equals(strCurrentDirectory))
- return false;
+ // Try to return to the previous directory, if not the same
+ // else fallback to root
+ if (strDirectory.Equals(strCurrentDirectory) || !Update(m_history.RemoveParentPath()))
+ Update(""); // Fallback to root
- // We assume, we can get the parent
- // directory again, but we have to
- // return false to be able to eg. show
+ // Return false to be able to eg. show
// an error message.
- Update(m_history.RemoveParentPath());
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.