diff options
author | Ken Moore <ken@pcbsd.org> | 2015-03-13 21:27:11 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-03-13 21:27:11 -0400 |
commit | bfb0b8867e706d7c2168bf0d35b39fca3b209d6f (patch) | |
tree | e8cb177b262c9a1c8ce1d3f5a6f066203b2fc1d9 /lumina-desktop/panel-plugins | |
parent | Merge branch 'master' of https://github.com/pcbsd/lumina (diff) | |
download | lumina-bfb0b8867e706d7c2168bf0d35b39fca3b209d6f.tar.gz lumina-bfb0b8867e706d7c2168bf0d35b39fca3b209d6f.tar.bz2 lumina-bfb0b8867e706d7c2168bf0d35b39fca3b209d6f.zip |
Make sure to clean up any broken sym-links in the favorites directory when the user button is clicked. This needs to be automated/moved once the new favorites system is set in place later.
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r-- | lumina-desktop/panel-plugins/userbutton/UserWidget.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp index 82a06012..1ee0b211 100644 --- a/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp +++ b/lumina-desktop/panel-plugins/userbutton/UserWidget.cpp @@ -194,6 +194,16 @@ void UserWidget::updateFavItems(){ connect(it, SIGNAL(RemovedShortcut()), this, SLOT(updateFavItems()) ); } static_cast<QBoxLayout*>(ui->scroll_fav->widget()->layout())->addStretch(); + + //Clean up any broken sym-links in the favorites directory + items = favdir.entryInfoList(QDir::System | QDir::NoDotAndDotDot, QDir::Name); + for(int i=0; i<items.length(); i++){ + if(items[i].isSymLink() && !items[i].exists()){ + //Broken sym-link - remove it + QFile::remove(items[i].absoluteFilePath()); + } + } + } //Apps Tab |