From 2d71ec1c7581fb6ddb44e8f13b34ce5704e9ed31 Mon Sep 17 00:00:00 2001 From: Roxanne Skelly Date: Tue, 2 Apr 2019 13:19:06 -0700 Subject: [PATCH 1/2] Case20410 Automatic Content Archives doesn't restore correctly with old Tutorial content set The tutorial content set had a content set Id of Null, which caused a failure to parse the content set. --- domain-server/src/DomainServer.cpp | 2 +- libraries/octree/src/OctreeEntitiesFileParser.cpp | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/domain-server/src/DomainServer.cpp b/domain-server/src/DomainServer.cpp index 5f82700e9c..400dc3642d 100644 --- a/domain-server/src/DomainServer.cpp +++ b/domain-server/src/DomainServer.cpp @@ -1734,7 +1734,7 @@ void DomainServer::processOctreeDataPersistMessage(QSharedPointer Date: Tue, 2 Apr 2019 17:25:00 -0700 Subject: [PATCH 2/2] Address a CR comment. --- .../octree/src/OctreeEntitiesFileParser.cpp | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/libraries/octree/src/OctreeEntitiesFileParser.cpp b/libraries/octree/src/OctreeEntitiesFileParser.cpp index 8e3fc76e2c..e82201adfd 100644 --- a/libraries/octree/src/OctreeEntitiesFileParser.cpp +++ b/libraries/octree/src/OctreeEntitiesFileParser.cpp @@ -108,22 +108,20 @@ bool OctreeEntitiesFileParser::parseEntities(QVariantMap& parsedEntities) { return false; } - if (idString == "{00000000-0000-0000-0000-000000000000}") { - // some older archives may have a null string id, so - // return success without setting parsedEntities, - // which will result in a new uuid for the restored - // archive. (not parsing and using isNull as parsing - // results in null if there is a corrupt string) - return true; - } + // some older archives may have a null string id, so + // return success without setting parsedEntities, + // which will result in a new uuid for the restored + // archive. (not parsing and using isNull as parsing + // results in null if there is a corrupt string) - QUuid idValue = QUuid::fromString(QLatin1String(idString.c_str()) ); - if (idValue.isNull()) { - _errorString = "Id value invalid UUID string: " + idString; - return false; + if (idString != "{00000000-0000-0000-0000-000000000000}") { + QUuid idValue = QUuid::fromString(QLatin1String(idString.c_str()) ); + if (idValue.isNull()) { + _errorString = "Id value invalid UUID string: " + idString; + return false; + } + parsedEntities["Id"] = idValue; } - - parsedEntities["Id"] = idValue; } else if (key == "Version") { if (gotVersion) { _errorString = "Duplicate Version entries";