mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 09:04:52 +01:00
build: fix gocritic lint issue underef
This commit is contained in:
parent
bad8207378
commit
4454ed9d3b
@ -888,7 +888,7 @@ func (fh *decrypter) fillBuffer() (err error) {
|
||||
fs.Errorf(nil, "crypt: ignoring: %v", ErrorEncryptedBadBlock)
|
||||
// Zero out the bad block and continue
|
||||
for i := range (*fh.buf)[:n] {
|
||||
(*fh.buf)[i] = 0
|
||||
fh.buf[i] = 0
|
||||
}
|
||||
}
|
||||
fh.bufIndex = 0
|
||||
|
@ -3889,7 +3889,7 @@ func versionLess(a, b *types.ObjectVersion) bool {
|
||||
if *a.Key > *b.Key {
|
||||
return false
|
||||
}
|
||||
dt := (*a.LastModified).Sub(*b.LastModified)
|
||||
dt := a.LastModified.Sub(*b.LastModified)
|
||||
if dt > 0 {
|
||||
return true
|
||||
}
|
||||
@ -5601,8 +5601,8 @@ func (o *Object) setMetaData(resp *s3.HeadObjectOutput) {
|
||||
// it from listings then it may have millisecond precision, but
|
||||
// if we read it from a HEAD/GET request then it will have
|
||||
// second precision.
|
||||
equalToWithinOneSecond := o.lastModified.Truncate(time.Second).Equal((*resp.LastModified).Truncate(time.Second))
|
||||
newHasNs := (*resp.LastModified).Nanosecond() != 0
|
||||
equalToWithinOneSecond := o.lastModified.Truncate(time.Second).Equal(resp.LastModified.Truncate(time.Second))
|
||||
newHasNs := resp.LastModified.Nanosecond() != 0
|
||||
if !equalToWithinOneSecond || newHasNs {
|
||||
o.lastModified = *resp.LastModified
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user