autostart unix impl: use mkpath instead of mkdir

Fixes TestUtility::testLaunchOnStartup(), if .config/ does not exist.
This commit is contained in:
Daniel Molkentin 2014-05-19 12:41:15 +02:00
parent ed3d9a7479
commit 86117aed0d

View file

@ -52,7 +52,7 @@ void setLaunchOnStartup_private(const QString &appName, const QString& guiName,
QString userAutoStartPath = getUserAutostartDir_private();
QString desktopFileLocation = userAutoStartPath+appName+QLatin1String(".desktop");
if (enable) {
if (!QDir().exists(userAutoStartPath) && !QDir().mkdir(userAutoStartPath)) {
if (!QDir().exists(userAutoStartPath) && !QDir().mkpath(userAutoStartPath)) {
qDebug() << "Could not create autostart directory";
return;
}