all: fix go-critic linter suggestions

This commit is contained in:
Oleg Kovalov
2018-08-04 12:16:43 +02:00
committed by Nick Craig-Wood
parent 44abf6473e
commit 06c9f76cd2
24 changed files with 66 additions and 66 deletions

View File

@@ -261,9 +261,9 @@ func (fh *RWFileHandle) close() (err error) {
return nil
}
copy := false
isCopied := false
if writer {
copy = fh.file.delWriter(fh, fh.modified())
isCopied = fh.file.delWriter(fh, fh.modified())
defer fh.file.finishWriterClose()
}
@@ -293,7 +293,7 @@ func (fh *RWFileHandle) close() (err error) {
}
}
if copy {
if isCopied {
// Transfer the temp file to the remote
cacheObj, err := fh.d.vfs.cache.f.NewObject(fh.remote)
if err != nil {