From e4a41770db2797025e7b25a4a50dab5a04ef7ce9 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Wed, 24 Aug 2016 12:07:38 -0400 Subject: Another small fix for the application auto-update routine. --- src-qt5/core/libLumina/LuminaXDG.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp index fc346f34..677c32d9 100644 --- a/src-qt5/core/libLumina/LuminaXDG.cpp +++ b/src-qt5/core/libLumina/LuminaXDG.cpp @@ -48,17 +48,17 @@ void XDGDesktopList::updateList(){ apps = dir.entryList(QStringList() << "*.desktop",QDir::Files, QDir::Name); for(int a=0; aQFileInfo(path).lastModified()) ){ + if(files.contains(path) && (files.value(path).lastRead>QFileInfo(path).lastModified()) ){ //Re-use previous data for this file (nothing changed) dFile = files[path]; ok=true; }else{ ok=false; - dFile = LXDG::loadDesktopFile(dir.absoluteFilePath(apps[a]),ok); //will change the "ok" variable as needed + dFile = LXDG::loadDesktopFile(path,ok); //will change the "ok" variable as needed appschanged = true; //flag that something changed - needed to load a file } if(ok && !found.contains(dFile.name)){ - if(!files.contains(path)){ newfiles << path; } //brand new file (not an update to a previously-read file) + if(!oldkeys.contains(path)){ newfiles << path; } //brand new file (not an update to a previously-read file) files.insert(path, dFile); found << dFile.name; oldkeys.removeAll(path); //make sure this key does not get cleaned up later -- cgit