Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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 1 changed file with 5 additions and 8 deletions. Show diff stats Hide diff stats

  1. +5 8 xbmc/windows/GUIMediaWindow.cpp
13 xbmc/windows/GUIMediaWindow.cpp
@@ -777,16 +777,13 @@ bool CGUIMediaWindow::Update(const CStdString &strDirectory, bool updateFilterPa
777 777 if (!GetDirectory(directory, items))
778 778 {
779 779 CLog::Log(LOGERROR,"CGUIMediaWindow::GetDirectory(%s) failed", strDirectory.c_str());
780   - // if the directory is the same as the old directory, then we'll return
781   - // false. Else, we assume we can get the previous directory
782   - if (strDirectory.Equals(strCurrentDirectory))
783   - return false;
  780 + // Try to return to the previous directory, if not the same
  781 + // else fallback to root
  782 + if (strDirectory.Equals(strCurrentDirectory) || !Update(m_history.RemoveParentPath()))
  783 + Update(""); // Fallback to root
784 784
785   - // We assume, we can get the parent
786   - // directory again, but we have to
787   - // return false to be able to eg. show
  785 + // Return false to be able to eg. show
788 786 // an error message.
789   - Update(m_history.RemoveParentPath());
790 787 return false;
791 788 }
792 789

0 comments on commit 40224df

Please sign in to comment.
Something went wrong with that request. Please try again.