do a best effort of moving files

right now it bails even if one file cannot be moved
This commit is contained in:
Inian committed 2022-07-08 11:52:22 +08:00
1 parent 25e3466412
commit 94dbcd5ff1
1 file changed
+4 -2
@@ -1126,11 +1126,13 @@ class StorageExplorerStore {
.concat(pathSegments.slice(columnIndex + 1))
.join('/')
return () => {
return new Promise(async (resolve, reject) => {
return new Promise(async (resolve) => {
const { error } = await this.supabaseClient.storage
.from(this.selectedBucket.name)
.move(fromPath, toPath)
if (error) reject()
if (error) {
toast.error(`Failed to move ${fromPath} to the new folder`)
}
resolve()
})
}