aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2016-08-26 09:31:28 -0400
committerKen Moore <ken@pcbsd.org>2016-08-26 09:31:28 -0400
commitc0213894c2e5103a9aa482eac60b6b84ee37f870 (patch)
tree321662d7fa2f9bea0deb2aa3dc4dfe8c399275fd /src-qt5/core
parentAnother small fix for the application auto-update routine. (diff)
downloadlumina-c0213894c2e5103a9aa482eac60b6b84ee37f870.tar.gz
lumina-c0213894c2e5103a9aa482eac60b6b84ee37f870.tar.bz2
lumina-c0213894c2e5103a9aa482eac60b6b84ee37f870.zip
When saving autostart preferences, make sure the local autostart directory exists and create it if not.
Diffstat (limited to 'src-qt5/core')
-rw-r--r--src-qt5/core/libLumina/LuminaXDG.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/LuminaXDG.cpp b/src-qt5/core/libLumina/LuminaXDG.cpp
index 677c32d9..97809102 100644
--- a/src-qt5/core/libLumina/LuminaXDG.cpp
+++ b/src-qt5/core/libLumina/LuminaXDG.cpp
@@ -1187,6 +1187,12 @@ bool LXDG::setAutoStarted(bool autostart, XDGDesktop app){
QString upath = QString(getenv("XDG_CONFIG_HOME")).section(":",0,0);
if(upath.isEmpty()){ upath = QDir::homePath()+"/.config/autostart/"; }
else{ upath.append("/autostart/"); }
+ //Verify that the autostart directory exists
+ if(!QFile::exists(upath)){
+ QDir dir;
+ dir.mkpath(upath);
+ }
+
//Quick check/finish for user-defined files which are getting disabled (just remove the file)
if(app.filePath.startsWith(upath) && !autostart){
return QFile::remove(app.filePath);
bgstack15