fix rename to take old mapping first

This commit is contained in:
Stephen Birarda 2016-03-09 13:14:55 -08:00
parent 5a197838f4
commit a65d06c7ce

View file

@ -610,7 +610,7 @@ bool AssetServer::renameMapping(const AssetPath& oldPath, const AssetPath& newPa
} }
} else { } else {
// take the old hash to remove the old mapping // take the old hash to remove the old mapping
auto oldMapping = _fileMappings[oldPath].toString(); auto oldMapping = _fileMappings.take(oldPath).toString();
if (!oldMapping.isEmpty()) { if (!oldMapping.isEmpty()) {
_fileMappings[newPath] = oldMapping; _fileMappings[newPath] = oldMapping;