From c0213894c2e5103a9aa482eac60b6b84ee37f870 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 26 Aug 2016 09:31:28 -0400 Subject: When saving autostart preferences, make sure the local autostart directory exists and create it if not. --- src-qt5/core/libLumina/LuminaXDG.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src-qt5/core') 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); -- cgit