1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-28 03:21:38 +03:00

create local autostart folder if is missing

BUG: 402934
This commit is contained in:
Michail Vourlakos 2019-01-06 20:54:48 +02:00
parent 80ef0d58dd
commit 8c21ca9072

View File

@ -330,6 +330,13 @@ void UniversalSettings::setAutostart(bool state)
autostartFile.remove();
emit autostartChanged();
} else if (state && metaFile.exists()) {
//! check if autostart folder exists and create otherwise
QDir autostartDir(QDir::homePath() + "/.config/autostart");
if (!autostartDir.exists()) {
QDir configDir(QDir::homePath() + "/.config");
configDir.mkdir("autostart");
}
metaFile.copy(autostartFile.fileName());
//! I haven't added the flag "OnlyShowIn=KDE;" into the autostart file
//! because I fall onto a Plasma 5.8 case that this flag