diff options
| author | Arno <arno@disconnect.de> | 2017-03-19 08:26:38 +0100 |
|---|---|---|
| committer | Arno <arno@disconnect.de> | 2017-03-19 08:26:38 +0100 |
| commit | 67063f009c4c5d1a313bcaa79a386a32e0e317fe (patch) | |
| tree | 45f6cbb4966ef334ac2835b78864194de064b1fc | |
| parent | 5a1dcd5e07af735c0ae1af96e544ab15ad13baff (diff) | |
| download | BeetPlayer-67063f009c4c5d1a313bcaa79a386a32e0e317fe.tar.gz BeetPlayer-67063f009c4c5d1a313bcaa79a386a32e0e317fe.tar.bz2 BeetPlayer-67063f009c4c5d1a313bcaa79a386a32e0e317fe.zip | |
Use $HOME as start when the saved dir doesn't exist any more
| -rw-r--r-- | playerwidget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/playerwidget.cpp b/playerwidget.cpp index 9bd9013..3645442 100644 --- a/playerwidget.cpp +++ b/playerwidget.cpp @@ -540,6 +540,10 @@ void PlayerWidget::doPopulateByFolder(QString dir){ } mCurDir = dir; QDir d(dir); + if(!d.exists()){ + d = QDir(QDir::homePath()); + mCurDir = d.absolutePath(); + } QMimeDatabase db; QStandardItem *root = mFolderModel->invisibleRootItem(); QIcon songIcon(":/song.png"); |
