Skip to content

Commit

Permalink
fix: 修复存在映射存储时可能导致归档文件误删问题 #2742
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlkl authored Nov 13, 2024
1 parent 728fed0 commit a273580
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,13 @@ class FileReferenceCleanupJob(
logger.info("Mock delete $sha256 on $credentialsKey.")
return
}
var successToDeleted = cleanupRelatedResources(sha256, credentialsKey)

// 删除文件
var successToDeleted = false
val existsRefOfMappingStorage = existsRefOfMappingStorage(row, collectionName)
if (!existsRefOfMappingStorage) {
successToDeleted = cleanupRelatedResources(sha256, credentialsKey)
}
if (!existsRefOfMappingStorage && storageService.exist(sha256, storageCredentials)) {
storageService.delete(sha256, storageCredentials)
successToDeleted = true
Expand Down

0 comments on commit a273580

Please sign in to comment.