db defender: fix getHost query and add more test cases

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2022-03-16 18:22:08 +01:00
parent 7b86e2ac59
commit 883a3dceaf
5 changed files with 32 additions and 8 deletions

View File

@@ -301,6 +301,8 @@ func (fs *S3Fs) Rename(source, target string) error {
copySource = pathEscape(copySource)
if fi.Size() > 5*1024*1024*1024 {
fsLog(fs, logger.LevelDebug, "renaming file %#v with size %v, a multipart copy is required, this may take a while",
source, fi.Size())
err = fs.doMultipartCopy(copySource, target, contentType, fi.Size())
} else {
ctx, cancelFn := context.WithDeadline(context.Background(), time.Now().Add(fs.ctxTimeout))