From 02c6f895cdf554942fe2e2de5e0ee60a6858aa42 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 10 Oct 2024 21:13:48 +0700 Subject: [PATCH] Fix for remove from non default stores (#6861) Signed-off-by: Andrey Sobolev --- dev/tool/src/storage.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/dev/tool/src/storage.ts b/dev/tool/src/storage.ts index 361bf19ac1..3a76b25ea2 100644 --- a/dev/tool/src/storage.ts +++ b/dev/tool/src/storage.ts @@ -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) }