diff options
-rw-r--r-- | src-qt5/core/libLumina/LuminaXDG.cpp | 5 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop/LDesktop.cpp | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index d92285c5..38128fc7 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -127,9 +127,8 @@ void XDGDesktop::sync(){ else if(var=="Type" && insection){ if(val.toLower()=="application"){ type = XDGDesktop::APP; } else if(val.toLower()=="link"){ type = XDGDesktop::LINK; } - else if(val.toLower()=="dir"){ type = XDGDesktop::DIR; } + else if(val.toLower().startsWith("dir")){ type = XDGDesktop::DIR; } //older specs are "Dir", newer specs are "Directory" else{ type = XDGDesktop::BAD; } //Unknown type - //hasType = true; } } //end reading file file.clear(); //done with contents of file @@ -176,7 +175,7 @@ bool XDGDesktop::isValid(bool showAll){ //if(DEBUG && !ok){ qDebug() << " - Link with missing URL"; } break; case XDGDesktop::DIR: - ok = !path.isEmpty(); + ok = !path.isEmpty() && QFile::exists(path); //if(DEBUG && !ok){ qDebug() << " - Dir with missing path"; } break; default: diff --git a/src-qt5/core/lumina-desktop/LDesktop.cpp b/src-qt5/core/lumina-desktop/LDesktop.cpp index 92cef4d1..73ed6d47 100644 --- a/src-qt5/core/lumina-desktop/LDesktop.cpp +++ b/src-qt5/core/lumina-desktop/LDesktop.cpp @@ -376,11 +376,11 @@ void LDesktop::UpdateDesktop(){ } //Also show anything available in the /media directory QDir media("/media"); - QStringList mediadirs = media.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); + 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]); } - qDebug() << "Found media Dirs:" << mediadirs; + //qDebug() << "Found media Dirs:" << mediadirs; UpdateDesktopPluginArea(); bgDesktop->LoadItems(plugins, filelist); } |