diff options
Diffstat (limited to 'src-qt5/core/lumina-desktop/LDesktop.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktop.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index a7ab1340..861a1aac 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -389,15 +389,20 @@ void LDesktop::UpdateDesktop(){ filelist << files[i].absoluteFilePath(); } } - //Also show anything available in the /media directory + //Also show anything available in the /media directory, and /run/media/USERNAME directory if(settings->value(DPREFIX+"generateMediaIcons",true).toBool()){ QDir media("/media"); QStringList mediadirs = media.entryList(QDir::Dirs | QDir::Files | QDir::NoDotAndDotDot, QDir::Name); for(int i=0; i<mediadirs.length(); i++){ filelist << media.absoluteFilePath(mediadirs[i]); } + QDir userMedia(QString("/run/media/%1").arg(QDir::homePath().split("/").takeLast())); + QStringList userMediadirs = userMedia.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); + for(int i=0; i<userMediadirs.length(); i++){ + filelist << userMedia.absoluteFilePath(userMediadirs[i]); + } + //qDebug() << "Found media Dirs:" << mediadirs << userMediadirs; } - //qDebug() << "Found media Dirs:" << mediadirs; UpdateDesktopPluginArea(); bgDesktop->LoadItems(plugins, filelist); } |