From 2c1623ed427b326a844c276e663a4ed9d377ac1f Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 2 Feb 2016 16:07:14 -0800 Subject: [PATCH] use extension with preceeding period --- assignment-client/src/octree/OctreeServer.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assignment-client/src/octree/OctreeServer.cpp b/assignment-client/src/octree/OctreeServer.cpp index 558b59edf7..69c54a17d5 100644 --- a/assignment-client/src/octree/OctreeServer.cpp +++ b/assignment-client/src/octree/OctreeServer.cpp @@ -1153,12 +1153,14 @@ void OctreeServer::domainSettingsRequestComplete() { absoluteFilePath = QDir(ServerPathUtils::getDataFilePath("entities/")).absoluteFilePath(_persistFilePath); } + static const QString ENTITY_PERSIST_EXTENSION = ".json.gz"; + // force the persist file to end with .json.gz - if (!absoluteFilePath.endsWith(_persistAsFileType, Qt::CaseInsensitive)) { - absoluteFilePath += _persistAsFileType; + if (!absoluteFilePath.endsWith(ENTITY_PERSIST_EXTENSION, Qt::CaseInsensitive)) { + absoluteFilePath += ENTITY_PERSIST_EXTENSION; } else { // make sure the casing of .json.gz is correct - absoluteFilePath.replace(_persistAsFileType, _persistAsFileType, Qt::CaseInsensitive); + absoluteFilePath.replace(ENTITY_PERSIST_EXTENSION, ENTITY_PERSIST_EXTENSION, Qt::CaseInsensitive); } if (!QFile::exists(absoluteFilePath)) {