Fix for remove from non default stores (#6861)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2024-10-10 21:13:48 +07:00 committed by GitHub
parent 65d45d7e82
commit 02c6f895cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -177,10 +177,8 @@ async function processAdapter (
if (aggrBlob === undefined || aggrBlob?.provider !== targetBlob.provider) {
targetBlob = await exAdapter.syncBlobFromStorage(ctx, workspaceId, targetBlob._id, exAdapter.defaultAdapter)
}
if (targetBlob.size === data.size) {
// We could safely delete source blob
toRemove.push(data._id)
}
// We could safely delete source blob
toRemove.push(data._id)
}
if (targetBlob === undefined) {
@ -211,7 +209,7 @@ async function processAdapter (
}
})
if (targetBlob !== undefined && targetBlob.size === sourceBlob.size) {
if (targetBlob !== undefined) {
// We could safely delete source blob
toRemove.push(sourceBlob._id)
}