summaryrefslogtreecommitdiffstats
path: root/logic
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2016-03-19 03:28:17 +0100
committerPetr Mrázek <peterix@gmail.com>2016-03-26 17:05:27 +0100
commitf56983e5cad9cc320bb00550ee428f7f55ef5c64 (patch)
tree41384f518ed6fcbf62ae6d3450b88f83ce3cdf50 /logic
parentec6204e447fd9e88b4cf2a628ed220f93f271fd0 (diff)
downloadMultiMC-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')
-rw-r--r--logic/minecraft/MojangVersionFormat.cpp10
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);