aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-03-13 21:27:11 -0400
committerKen Moore <ken@pcbsd.org>2015-03-13 21:27:11 -0400
commitbfb0b8867e706d7c2168bf0d35b39fca3b209d6f (patch)
treee8cb177b262c9a1c8ce1d3f5a6f066203b2fc1d9 /lumina-desktop/panel-plugins
parentMerge branch 'master' of https://github.com/pcbsd/lumina (diff)
downloadlumina-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.cpp10
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
bgstack15