mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
s3: metadata is not currently supported
remove useless code, we'll add it again once we support metadata Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -190,9 +190,6 @@ func (fs *S3Fs) Stat(name string) (os.FileInfo, error) {
|
||||
isDir = err == nil
|
||||
}
|
||||
info := NewFileInfo(name, isDir, util.GetIntFromPointer(obj.ContentLength), util.GetTimeFromPointer(obj.LastModified), false)
|
||||
if !isDir {
|
||||
info.setMetadata(obj.Metadata)
|
||||
}
|
||||
return info, nil
|
||||
}
|
||||
if !fs.IsNotExist(err) {
|
||||
@@ -745,11 +742,6 @@ func (fs *S3Fs) copyFileInternal(source, target string, srcInfo os.FileInfo) err
|
||||
SSECustomerKeyMD5: util.NilIfEmpty(fs.sseCustomerKeyMD5),
|
||||
}
|
||||
|
||||
metadata := getMetadata(srcInfo)
|
||||
if len(metadata) > 0 {
|
||||
copyObject.Metadata = metadata
|
||||
}
|
||||
|
||||
_, err := fs.svc.CopyObject(ctx, copyObject)
|
||||
|
||||
metric.S3CopyObjectCompleted(err)
|
||||
|
||||
Reference in New Issue
Block a user