Skip to content

Commit

Permalink
Retrying file moving by copying on error
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Dec 19, 2020
1 parent a2383f2 commit 928e48e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ function moveFolderContentsFiles(
} while (pageToken !== undefined);
for (const file of files) {
if (file.canMove) {
moveFile(file.id!, source, destination);
try {
moveFile(file.id!, source, destination);
} catch (_) {
moveFileByCopy(file.id!, file.name!, destination, copyComments);
}
} else {
moveFileByCopy(file.id!, file.name!, destination, copyComments);
}
Expand Down

0 comments on commit 928e48e

Please sign in to comment.