diff --git a/app/layouts/importer.cpp b/app/layouts/importer.cpp index 2dc67cd56..72c95d28c 100644 --- a/app/layouts/importer.cpp +++ b/app/layouts/importer.cpp @@ -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");