on xenial help sign in
Remove wizardEnabledPath if it's a folder

In some cases it seems that wizardEnabledPath is a folder and not a file, this handles that issue.

commitf4fdb19bb320f717e973b54e93c4d199f82aa535 authorMarius Gripsgard <marius@ubports.com> dateWed 15 Aug 2018, 22:21 (8 years ago) parente364792
1 file changed+4
plugins/Wizard/System.cpp+4
plugins/Wizard/System.cpp+4
@@ -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();