1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-02-03 09:47:22 +03:00

autostart: do not overwrite startup file

This commit is contained in:
Michail Vourlakos 2021-12-02 20:53:43 +02:00
parent 05e588c333
commit 3067b6d51c

View File

@ -550,6 +550,11 @@ void Importer::enableAutostart()
QFile autostartFile(Latte::configPath() + "/autostart/org.kde.latte-dock.desktop");
QFile metaFile(standardPath("applications/org.kde.latte-dock.desktop", false));
if (autostartFile.exists()) {
//! if autostart file already exists, do nothing
return;
}
if (metaFile.exists()) {
//! check if autostart folder exists and create otherwise
QDir autostartDir(Latte::configPath() + "/autostart");