@@ -115,6 +115,10 @@ void System::setWizardEnabled(bool enabled)
115115 if (QFile::exists(wizardEnabledPath())) {
116116 QFile::remove(wizardEnabledPath());
117117 }
118+ // For special cases check if wizardEnabledPath is a folder
119+ if (QDir(wizardEnabledPath()).exists()) {
120+ QDir(wizardEnabledPath()).removeRecursively();
121+ }
118122 QFile::copy(currentFrameworkPath(), wizardEnabledPath());
119123 m_fsWatcher.addPath(wizardEnabledPath());
120124 Q_EMIT wizardEnabledChanged();