diff options
author | Ken Moore <ken@pcbsd.org> | 2015-06-18 08:54:36 -0400 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-06-18 08:54:36 -0400 |
commit | b064f649fbfbcfd0ebd55ee0306554638a932a5d (patch) | |
tree | 9b3c8bd0a7fcb059d869b382bb7d2b89e307b4bb /libLumina | |
parent | Merge branch 'master' of github.com:pcbsd/lumina (diff) | |
download | lumina-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.cpp | 6 |
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; } |