Merge pull request #12467 from Atlante45/feat/backups-integration

Ignore baked assets in backups
This commit is contained in:
Stephen Birarda 2018-02-21 21:42:18 -07:00 committed by GitHub
commit 07bbb33777
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -394,9 +394,15 @@ void AssetsBackupHandler::refreshMappings() {
QObject::connect(request, &GetAllMappingsRequest::finished, this, [this](GetAllMappingsRequest* request) {
if (request->getError() == MappingRequest::NoError) {
const auto& mappings = request->getMappings();
// Clear existing mappings
_currentMappings.clear();
// Set new mapping, but ignore baked assets
for (const auto& mapping : mappings) {
_currentMappings.insert({ mapping.first, mapping.second.hash });
if (!mapping.first.startsWith(AssetUtils::HIDDEN_BAKED_CONTENT_FOLDER)) {
_currentMappings.insert({ mapping.first, mapping.second.hash });
}
}
_lastMappingsRefresh = usecTimestampNow();