mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 01:44:41 +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)
|
fs.Errorf(nil, "crypt: ignoring: %v", ErrorEncryptedBadBlock)
|
||||||
// Zero out the bad block and continue
|
// Zero out the bad block and continue
|
||||||
for i := range (*fh.buf)[:n] {
|
for i := range (*fh.buf)[:n] {
|
||||||
(*fh.buf)[i] = 0
|
fh.buf[i] = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fh.bufIndex = 0
|
fh.bufIndex = 0
|
||||||
|
@ -3889,7 +3889,7 @@ func versionLess(a, b *types.ObjectVersion) bool {
|
|||||||
if *a.Key > *b.Key {
|
if *a.Key > *b.Key {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
dt := (*a.LastModified).Sub(*b.LastModified)
|
dt := a.LastModified.Sub(*b.LastModified)
|
||||||
if dt > 0 {
|
if dt > 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -5601,8 +5601,8 @@ func (o *Object) setMetaData(resp *s3.HeadObjectOutput) {
|
|||||||
// it from listings then it may have millisecond precision, but
|
// it from listings then it may have millisecond precision, but
|
||||||
// if we read it from a HEAD/GET request then it will have
|
// if we read it from a HEAD/GET request then it will have
|
||||||
// second precision.
|
// second precision.
|
||||||
equalToWithinOneSecond := o.lastModified.Truncate(time.Second).Equal((*resp.LastModified).Truncate(time.Second))
|
equalToWithinOneSecond := o.lastModified.Truncate(time.Second).Equal(resp.LastModified.Truncate(time.Second))
|
||||||
newHasNs := (*resp.LastModified).Nanosecond() != 0
|
newHasNs := resp.LastModified.Nanosecond() != 0
|
||||||
if !equalToWithinOneSecond || newHasNs {
|
if !equalToWithinOneSecond || newHasNs {
|
||||||
o.lastModified = *resp.LastModified
|
o.lastModified = *resp.LastModified
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user