From 1b4ea724c7b202c675a39695aba3b047b8f3069e Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 23 Jun 2016 11:04:21 +0200 Subject: [PATCH] Make autostart directory if it does not exists. --- src/miscellaneous/systemfactory.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/miscellaneous/systemfactory.cpp b/src/miscellaneous/systemfactory.cpp index 4f69197fd..40f22a1ce 100755 --- a/src/miscellaneous/systemfactory.cpp +++ b/src/miscellaneous/systemfactory.cpp @@ -154,6 +154,10 @@ bool SystemFactory::setAutoStartStatus(const AutoStartStatus &new_status) { } } + if (!QDir().mkpath(APP_DESKTOP_ENTRY_PATH)) { + return false; + } + return QFile::copy(QString(APP_DESKTOP_ENTRY_PATH) + QDir::separator() + APP_DESKTOP_SOURCE_ENTRY_FILE, getAutostartDesktopFileLocation());