mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 00:13:29 +02:00
cleanup left file debug, add check for deleted mapping
This commit is contained in:
parent
775898893b
commit
334dc3cb6c
1 changed files with 4 additions and 3 deletions
|
@ -151,9 +151,7 @@ void AssetServer::cleanupUnmappedFiles() {
|
||||||
|
|
||||||
for (const auto& fileInfo : files) {
|
for (const auto& fileInfo : files) {
|
||||||
if (hashFileRegex.exactMatch(fileInfo.fileName())) {
|
if (hashFileRegex.exactMatch(fileInfo.fileName())) {
|
||||||
if (mappedHashes.contains(fileInfo.fileName())) {
|
if (!mappedHashes.contains(fileInfo.fileName())) {
|
||||||
qDebug() << "\tLeaving" << fileInfo.fileName() << "in asset files directory since it is mapped";
|
|
||||||
} else {
|
|
||||||
// remove the unmapped file
|
// remove the unmapped file
|
||||||
QFile removeableFile { fileInfo.absoluteFilePath() };
|
QFile removeableFile { fileInfo.absoluteFilePath() };
|
||||||
|
|
||||||
|
@ -578,6 +576,9 @@ bool AssetServer::deleteMappings(AssetPathList& paths) {
|
||||||
} else {
|
} else {
|
||||||
auto oldMapping = _fileMappings.take(path);
|
auto oldMapping = _fileMappings.take(path);
|
||||||
if (!oldMapping.isNull()) {
|
if (!oldMapping.isNull()) {
|
||||||
|
// add this hash to the list we need to check for asset removal from server
|
||||||
|
hashesToCheck << oldMapping.toString();
|
||||||
|
|
||||||
qDebug() << "Deleted a mapping:" << path << "=>" << oldMapping.toString();
|
qDebug() << "Deleted a mapping:" << path << "=>" << oldMapping.toString();
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Unable to delete a mapping that was not found:" << path;
|
qDebug() << "Unable to delete a mapping that was not found:" << path;
|
||||||
|
|
Loading…
Reference in a new issue