You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using an FSMemoryStore, after closing a write stream that only called nextPut:, the file is not properly truncated. nextPutAll: does not have this behavior.
I'm not sure whether basicNextPut: is at fault for calling at:put: instead of at:write:startingAt:count: or whether at:put: should instead set the size to the index - maybe at:put: is sometimes used to set bytes in the middle of a file, without wanting a truncation?
The text was updated successfully, but these errors were encountered:
When using an
FSMemoryStore
, after closing a write stream that only callednextPut:
, the file is not properly truncated.nextPutAll:
does not have this behavior.Some investigation:
FSWriteStream>>basicNextPut:
callsat:put:
on theFSMemoryHandle
at:put:
is overridden onFSMemoryHandle
, to (among other things) dosize := size max: index
(keeping at least the original size)FSHandle>>at:put:
and withbasicNextPutAll:
),at:write:startingAt:count:
is called, which, onFSMemoryHandle
, setssize
to the index of the byte that was written last (correctly truncating the file)I'm not sure whether
basicNextPut:
is at fault for callingat:put:
instead ofat:write:startingAt:count:
or whetherat:put:
should instead set the size to theindex
- maybeat:put:
is sometimes used to set bytes in the middle of a file, without wanting a truncation?The text was updated successfully, but these errors were encountered: