forked from TrueCloudLab/rclone
s3,swift: Add --use-server-modtime
`--use-server-modtime` stops s3 and swift retrieving the modtime from metadata which enables a fast sync mode with the `--update` flag.
This commit is contained in:
parent
6b67489133
commit
1db68571fd
7 changed files with 47 additions and 0 deletions
|
@ -719,6 +719,9 @@ func (o *Object) readMetaData() (err error) {
|
|||
// It attempts to read the objects mtime and if that isn't present the
|
||||
// LastModified returned in the http headers
|
||||
func (o *Object) ModTime() time.Time {
|
||||
if fs.Config.UseServerModTime {
|
||||
return o.info.LastModified
|
||||
}
|
||||
err := o.readMetaData()
|
||||
if err != nil {
|
||||
fs.Debugf(o, "Failed to read metadata: %s", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue