mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
fix(storage): purge the path the row was targeted with
Rebuilding it from the opened folders reads state that can have moved on since the row was picked. Rows synthesized without a path still fall back to it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N3euXsz25sTybsGTcxCFfn
This commit is contained in:
1 parent
904c419980
commit
cfd5e7948a
1 file changed
+3
-1
@@ -33,7 +33,9 @@ export const ConfirmPurgeModal = () => {
|
||||
if (!projectRef || !selectedBucket?.id || itemToPurge === undefined) return
|
||||
|
||||
// The endpoint addresses an object by full path; a row only knows its leaf name.
|
||||
const path = getStorageItemPath({ openedFolders }, itemToPurge)
|
||||
// The path captured when the row was targeted beats rebuilding it from folders
|
||||
// that may have moved on; rows synthesized without one still need the rebuild.
|
||||
const path = itemToPurge.path ?? getStorageItemPath({ openedFolders }, itemToPurge)
|
||||
|
||||
purgeObject({ projectRef, bucketId: selectedBucket.id, path })
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user