handle incorrect casing in persist file extension

This commit is contained in:
Stephen Birarda 2016-02-02 15:49:40 -08:00
parent 90b78feb1e
commit 99d1fa08fd

View file

@ -1154,8 +1154,11 @@ void OctreeServer::domainSettingsRequestComplete() {
}
// force the persist file to end with .json.gz
if (!absoluteFilePath.endsWith(".json.gz", Qt::CaseInsensitive)) {
absoluteFilePath += ".json.gz";
if (!absoluteFilePath.endsWith(_persistAsFileType, Qt::CaseInsensitive)) {
absoluteFilePath += _persistAsFileType;
} else {
// make sure the casing of .json.gz is correct
absoluteFilePath.replace(_persistAsFileType, _persistAsFileType, Qt::CaseInsensitive);
}
if (!QFile::exists(absoluteFilePath)) {