fs: add size to JSON logs when moving or copying an object #6849

This commit is contained in:
Nick Craig-Wood 2023-03-16 11:56:41 +00:00
parent ab746ef891
commit 46484022b0
1 changed files with 2 additions and 3 deletions

View File

@ -500,10 +500,9 @@ func Copy(ctx context.Context, f fs.Fs, dst fs.Object, remote string, src fs.Obj
}
}
if newDst != nil && src.String() != newDst.String() {
fs.Infof(src, "%s to: %s", actionTaken, newDst.String())
} else {
fs.Infof(src, actionTaken)
actionTaken = fmt.Sprintf("%s to: %s", actionTaken, newDst.String())
}
fs.Infof(src, "%s%s", actionTaken, fs.LogValueHide("size", fs.SizeSuffix(src.Size())))
return newDst, err
}