diff options
Diffstat (limited to 'backend/OneSixUpdate.cpp')
-rw-r--r-- | backend/OneSixUpdate.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/backend/OneSixUpdate.cpp b/backend/OneSixUpdate.cpp index 5cd2c78c..2bb2f496 100644 --- a/backend/OneSixUpdate.cpp +++ b/backend/OneSixUpdate.cpp @@ -92,12 +92,15 @@ void OneSixUpdate::versionFileFinished() { QString version1 = PathCombine(inst_dir, "/version.json"); ensurePathExists(version1); + // FIXME: detect errors here, download to a temp file, swap QFile vfile1 (version1); vfile1.open(QIODevice::Truncate | QIODevice::WriteOnly ); vfile1.write(DlJob->m_data); vfile1.close(); } + // the version is downloaded safely. update is 'done' at this point + m_inst->setShouldUpdate(false); // save the version file in versions/$version/$version.json /* //QString version2 = QString("versions/") + version_id + "/" + version_id + ".json"; |