aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file.go
diff options
context:
space:
mode:
authorSebastian Lackner2018-12-26 22:22:40 +0100
committerrfjakob2018-12-27 15:18:03 +0100
commit4c2ff26457471cd36b25c29fb3f982b27002ce3c (patch)
tree42be76781d23a51f85a1c4ca13e0728824d07f0a /internal/fusefrontend/file.go
parent1ced0b192e6abcb047af0b9f11dfaf63052598c4 (diff)
fusefrontend: Remove unnecessary check in doRead function.
The same condition is already checked a few lines above, and 'err' is not changed inbetween.
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r--internal/fusefrontend/file.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go
index 9230bed..04ae526 100644
--- a/internal/fusefrontend/file.go
+++ b/internal/fusefrontend/file.go
@@ -162,10 +162,8 @@ func (f *File) doRead(dst []byte, off uint64, length uint64) ([]byte, fuse.Statu
// Empty file
return nil, fuse.OK
}
- if err != nil {
- tlog.Warn.Printf("doRead %d: corrupt header: %v", f.qIno.Ino, err)
- return nil, fuse.EIO
- }
+ tlog.Warn.Printf("doRead %d: corrupt header: %v", f.qIno.Ino, err)
+ return nil, fuse.EIO
}
// Save into the file table
f.fileTableEntry.ID = fileID