aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/lumina-desktop/LSession.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LSession.cpp b/src-qt5/core/lumina-desktop/LSession.cpp
index 8143f260..3088696f 100644
--- a/src-qt5/core/lumina-desktop/LSession.cpp
+++ b/src-qt5/core/lumina-desktop/LSession.cpp
@@ -161,7 +161,8 @@ void LSession::setupSession(){
watcherChange( QDir::homePath()+"/Desktop" );
//And watch the /media directory
if(QFile::exists("/media")){ watcherChange("/media"); }
-
+ if(!QFile::exists("/tmp/.autofs_change")){ system("touch /tmp/.autofs_change"); }
+ watcherChange("/tmp/.autofs_change");
//connect internal signals/slots
connect(watcher, SIGNAL(directoryChanged(QString)), this, SLOT(watcherChange(QString)) );
connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(watcherChange(QString)) );
@@ -341,7 +342,7 @@ void LSession::watcherChange(QString changed){
desktopFiles = QDir(changed).entryInfoList(QDir::NoDotAndDotDot | QDir::Files | QDir::Dirs ,QDir::Name | QDir::IgnoreCase | QDir::DirsFirst);
if(DEBUG){ qDebug() << "New Desktop Files:" << desktopFiles.length(); }
emit DesktopFilesChanged();
- }else if(changed.toLower() == "/media"){
+ }else if(changed.toLower() == "/media" || changed == "/tmp/.autofs_change" ){
emit MediaFilesChanged();
}else if(changed.endsWith("favorites.list")){ emit FavoritesChanged(); }
//Now ensure this file was not removed from the watcher
bgstack15