aboutsummaryrefslogtreecommitdiff
path: root/libLumina
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-06-18 08:54:36 -0400
committerKen Moore <ken@pcbsd.org>2015-06-18 08:54:36 -0400
commitb064f649fbfbcfd0ebd55ee0306554638a932a5d (patch)
tree9b3c8bd0a7fcb059d869b382bb7d2b89e307b4bb /libLumina
parentMerge branch 'master' of github.com:pcbsd/lumina (diff)
downloadlumina-b064f649fbfbcfd0ebd55ee0306554638a932a5d.tar.gz
lumina-b064f649fbfbcfd0ebd55ee0306554638a932a5d.tar.bz2
lumina-b064f649fbfbcfd0ebd55ee0306554638a932a5d.zip
Add a quick verification to the favorites system to ensure that the directory where favorites are stored is actually in existance.
Diffstat (limited to 'libLumina')
-rw-r--r--libLumina/LuminaUtils.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/libLumina/LuminaUtils.cpp b/libLumina/LuminaUtils.cpp
index b569782e..89dc72a4 100644
--- a/libLumina/LuminaUtils.cpp
+++ b/libLumina/LuminaUtils.cpp
@@ -203,7 +203,13 @@ QStringList LUtils::listFavorites(){
if(lastRead.isNull() || lastRead<QFileInfo(QDir::homePath()+"/.lumina/favorites/fav.list").lastModified()){
fav = LUtils::readFile(QDir::homePath()+"/.lumina/favorites/fav.list");
lastRead = cur;
+ if(fav.isEmpty()){
+ //Make sure the favorites dir exists, and create it if necessary
+ QDir dir(QDir::homePath()+"/.lumina/favorites");
+ if(!dir.exists()){ dir.mkpath(QDir::homePath()+"/.lumina/favorites"); }
+ }
}
+
return fav;
}
bgstack15