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
This commit is contained in:
Jakob Unterwurzacher 2023-02-21 22:04:30 +01:00
parent 85297cda97
commit 8f3ec5dcaa
1 changed files with 1 additions and 1 deletions

View File

@ -384,7 +384,7 @@ func (f *File) Write(ctx context.Context, data []byte, off int64) (uint32, sysca
} }
} }
n, errno := f.doWrite(data, off) n, errno := f.doWrite(data, off)
if errno != 0 { if errno == 0 {
f.lastOpCount = openfiletable.WriteOpCount() f.lastOpCount = openfiletable.WriteOpCount()
f.lastWrittenOffset = off + int64(len(data)) - 1 f.lastWrittenOffset = off + int64(len(data)) - 1
} }