on xenial help sign in
Make an empty file if framework does not exists
commitda474b151c43b6250b5a5567dbf086e71de01f5e authorMarius Gripsgard <marius@ubports.com> dateTue 8 Jan 2019, 00:16 (8 years ago) parent4499a4c
1 file changed+5−1
plugins/Wizard/System.cpp+5−1
plugins/Wizard/System.cpp+5−1
@@ -119,7 +119,11 @@ void System::setWizardEnabled(bool enabled)
119119 if (QDir(wizardEnabledPath()).exists()) {
120120 QDir(wizardEnabledPath()).removeRecursively();
121121 }
122− QFile::copy(currentFrameworkPath(), wizardEnabledPath());
122+ if (!QFile::copy(currentFrameworkPath(), wizardEnabledPath())) {
123+ // Make en empty file if framework does not exist
124+ QFile f(wizardEnabledPath());
125+ f.open(QFile::WriteOnly);
126+ }
123127 m_fsWatcher.addPath(wizardEnabledPath());
124128 Q_EMIT wizardEnabledChanged();
125129 Q_EMIT isUpdateChanged();