Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 1f97c4e

Browse files
authored
Merge pull request #401 from skaut/retry-by-copy
Retrying file moving by copying on error
2 parents a2383f2 + 928e48e commit 1f97c4e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/backend/move.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,11 @@ function moveFolderContentsFiles(
110110
} while (pageToken !== undefined);
111111
for (const file of files) {
112112
if (file.canMove) {
113-
moveFile(file.id!, source, destination);
113+
try {
114+
moveFile(file.id!, source, destination);
115+
} catch (_) {
116+
moveFileByCopy(file.id!, file.name!, destination, copyComments);
117+
}
114118
} else {
115119
moveFileByCopy(file.id!, file.name!, destination, copyComments);
116120
}

0 commit comments

Comments
 (0)