|
an additional nil check here seems to fix it (the " stream ifNil: [ ^ absentBlock value ]. ").
readStreamAtFileIndex: index atPosition: position ifPresent: presentBlock ifAbsent: absentBlock
| queue stream rofa result |
queue := readOnlyQueue.
rofa := queue nextOrNil ifNil: [ self createReadOnlyFiles ].
rofa ifNil: [ ^ absentBlock value ].
stream := rofa at: index.
stream ifNil: [ ^ absentBlock value ].
position > (files at: index) size ifTrue: [
self finishedReading: rofa from: queue.
^ absentBlock value
].
stream position: position.
result := presentBlock value: stream.
self finishedReading: rofa from: queue.
^ result
|
|
|
Priority: 2 – Really Important
|
|
Status: Work Needed
|
|
Assigned to: Everyone
|
|
Milestone: Pharo7.0
|
Go to Case
|
|