diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-14 08:13:41 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-14 08:13:41 +0200 |
commit | 77e80665422c4e97e2286418ab55e20c4030023b (patch) | |
tree | fe8b8d19de00e07f6bb8908a0be1973f9e93dd9a /backend/OneSixUpdate.cpp | |
parent | ff33d4a1a48abf1442cde77c2253f071d0870d50 (diff) | |
download | MultiMC-77e80665422c4e97e2286418ab55e20c4030023b.tar MultiMC-77e80665422c4e97e2286418ab55e20c4030023b.tar.gz MultiMC-77e80665422c4e97e2286418ab55e20c4030023b.tar.lz MultiMC-77e80665422c4e97e2286418ab55e20c4030023b.tar.xz MultiMC-77e80665422c4e97e2286418ab55e20c4030023b.zip |
Working on legacy support, incomplete.
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"; |