autostart: do not overwrite startup file

work/m_layershell
Michail Vourlakos 3 years ago
parent 05e588c333
commit 3067b6d51c

@ -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");

Loading…
Cancel
Save