From e8302ea5a414f7936f2a581f97bb0174335da0a3 Mon Sep 17 00:00:00 2001 From: Eric Peterson Date: Mon, 12 Jul 2021 11:12:39 +0200 Subject: [PATCH] Use move instead of copy in GCS migrate when requested. Signed-off-by: Eric Peterson --- .../src/stages/publish/migrations/GoogleMigration.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/techdocs-common/src/stages/publish/migrations/GoogleMigration.ts b/packages/techdocs-common/src/stages/publish/migrations/GoogleMigration.ts index a2b5b8d719..f1dac0c6e6 100644 --- a/packages/techdocs-common/src/stages/publish/migrations/GoogleMigration.ts +++ b/packages/techdocs-common/src/stages/publish/migrations/GoogleMigration.ts @@ -54,9 +54,8 @@ export class MigrateWriteStream extends Writable { } // Otherwise, copy or move the file. - // todo: Use file.move instead of file.copy when removeOriginal is true. const migrate = this.removeOriginal - ? file.copy.bind(file) + ? file.move.bind(file) : file.copy.bind(file); this.logger.debug(`Migrating ${file.name}`); migrate(newFile)