[vlmc-devel] commit: ImportController: Don' t display a folded tree if the last imported dir doesn't exist anymore. ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Sat Jul 3 17:21:49 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Thu Jul  1 17:34:35 2010 +0200| [4afe35befedacba29f5121ff806d04fc8cc19ad1] | committer: Hugo Beauzée-Luyssen 

ImportController: Don't display a folded tree if the last imported dir doesn't exist anymore.

For instance if you loaded a file from a removable hard drive.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=4afe35befedacba29f5121ff806d04fc8cc19ad1
---

 src/Gui/import/ImportController.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/Gui/import/ImportController.cpp b/src/Gui/import/ImportController.cpp
index 7cc6159..e4cd19d 100644
--- a/src/Gui/import/ImportController.cpp
+++ b/src/Gui/import/ImportController.cpp
@@ -257,6 +257,8 @@ ImportController::restoreCurrentPath()
 {
     QSettings s;
     QVariant path = s.value( "ImportPreviouslySelectPath", QDir::homePath() );
+    if ( QFile::exists( path.toString() ) == false )
+        path = QDir::homePath();
     QFileInfo info = path.toString();
     m_currentlyWatchedDir = info.absoluteFilePath();
 }



More information about the Vlmc-devel mailing list