diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-03-19 03:28:17 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-03-26 17:05:27 +0100 |
commit | f56983e5cad9cc320bb00550ee428f7f55ef5c64 (patch) | |
tree | 41384f518ed6fcbf62ae6d3450b88f83ce3cdf50 /logic/minecraft/MojangVersionFormat.cpp | |
parent | ec6204e447fd9e88b4cf2a628ed220f93f271fd0 (diff) | |
download | MultiMC-f56983e5cad9cc320bb00550ee428f7f55ef5c64.tar MultiMC-f56983e5cad9cc320bb00550ee428f7f55ef5c64.tar.gz MultiMC-f56983e5cad9cc320bb00550ee428f7f55ef5c64.tar.lz MultiMC-f56983e5cad9cc320bb00550ee428f7f55ef5c64.tar.xz MultiMC-f56983e5cad9cc320bb00550ee428f7f55ef5c64.zip |
NOISSUE do not write 'time' and 'releaseTime' when they are null
Diffstat (limited to 'logic/minecraft/MojangVersionFormat.cpp')
-rw-r--r-- | logic/minecraft/MojangVersionFormat.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/logic/minecraft/MojangVersionFormat.cpp b/logic/minecraft/MojangVersionFormat.cpp index 78447aa8..779a2b7d 100644 --- a/logic/minecraft/MojangVersionFormat.cpp +++ b/logic/minecraft/MojangVersionFormat.cpp @@ -232,8 +232,14 @@ void MojangVersionFormat::writeVersionProperties(const VersionFile* in, QJsonObj writeString(out, "minecraftArguments", in->minecraftArguments); writeString(out, "type", in->type); writeString(out, "assets", in->assets); - writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime)); - writeString(out, "time", timeToS3Time(in->m_updateTime)); + if(!in->m_releaseTime.isNull()) + { + writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime)); + } + if(!in->m_updateTime.isNull()) + { + writeString(out, "time", timeToS3Time(in->m_updateTime)); + } if(in->minimumLauncherVersion != -1) { out.insert("minimumLauncherVersion", in->minimumLauncherVersion); |