diff options
author | Jakob Unterwurzacher | 2023-02-21 22:04:30 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2023-02-21 22:08:41 +0100 |
commit | 8f3ec5dcaa6eb18d11746675190a7aaceb422764 (patch) | |
tree | 0b97c3b9c2a0cabecafcaee6c5f5dbdd9b9d8c01 /internal/fusefrontend | |
parent | 85297cda97d018b514361a2088a78f50f1446f95 (diff) |
fusefrontend: unbreak isConsecutiveWrite streaming write optimization
Commit 6196a5b5 got the logic inverted, hence we never
set the last position markers.
Fixes https://github.com/rfjakob/gocryptfs/issues/712
Diffstat (limited to 'internal/fusefrontend')
-rw-r--r-- | internal/fusefrontend/file.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index ff26a6e..8d0ba01 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -384,7 +384,7 @@ func (f *File) Write(ctx context.Context, data []byte, off int64) (uint32, sysca } } n, errno := f.doWrite(data, off) - if errno != 0 { + if errno == 0 { f.lastOpCount = openfiletable.WriteOpCount() f.lastWrittenOffset = off + int64(len(data)) - 1 } |