From 6c01f9e5b12ff4b18c8866bca405f11407e9ad5c Mon Sep 17 00:00:00 2001 From: David Bosschaert Date: Thu, 5 Dec 2024 14:02:31 +0100 Subject: [PATCH] Temporarily disable creating the version on rename (#99) --- src/storage/object/copy.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/storage/object/copy.js b/src/storage/object/copy.js index 50bc118..0cd2202 100644 --- a/src/storage/object/copy.js +++ b/src/storage/object/copy.js @@ -17,7 +17,7 @@ import { import getObject from './get.js'; import getS3Config from '../utils/config.js'; import { invalidateCollab } from '../utils/object.js'; -import { postObjectVersionWithLabel, putObjectWithVersion } from '../version/put.js'; +import { putObjectWithVersion } from '../version/put.js'; import { listCommand } from '../utils/list.js'; const MAX_KEYS = 900; @@ -77,7 +77,10 @@ export const copyFile = async (config, env, daCtx, sourceKey, details, isRename) type: original.contentType, }); } - await postObjectVersionWithLabel('Moved', env, daCtx); + // We're doing a rename + + // TODO when storing the version make sure to do it from the file that was where there before + // await postObjectVersionWithLabel('Moved', env, daCtx); const client = new S3Client(config); // This is a move so copy to the new location