diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 50aa551..3313934 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -4,6 +4,7 @@ package fusefrontend import ( "bytes" + "encoding/hex" "fmt" "io" "log" @@ -158,7 +159,12 @@ func (f *File) doRead(dst []byte, off uint64, length uint64) ([]byte, fuse.Statu // Empty file return nil, fuse.OK } - tlog.Warn.Printf("doRead %d: corrupt header: %v", f.qIno.Ino, err) + buf := make([]byte, 100) + n, _ := f.fd.ReadAt(buf, 0) + buf = buf[:n] + hexdump := hex.EncodeToString(buf) + tlog.Warn.Printf("doRead %d: corrupt header: %v\nFile hexdump (%d bytes): %s", + f.qIno.Ino, err, n, hexdump) return nil, fuse.EIO } // Save into the file table