aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins/userbutton
diff options
context:
space:
mode:
Diffstat (limited to 'lumina-desktop/panel-plugins/userbutton')
-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