Skip to content

Commit

Permalink
Merge pull request #401 from skaut/retry-by-copy
Browse files Browse the repository at this point in the history
Retrying file moving by copying on error
  • Loading branch information
marekdedic authored Dec 19, 2020
2 parents a2383f2 + 928e48e commit 1f97c4e
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 1f97c4e

Please sign in to comment.