Time: 10 October 2017, 12:21:24.555739 am
- synchronize the underlying file stream of CurrentReadOnlySourceFiles and SourceFiles before read in RemoteString >> #text
=============== Diff against Files-eem.171 ===============
Item was changed:
----- Method: RemoteString>>text (in category 'accessing') -----
"Answer the receiver's string asText if remote files are enabled."
| theFile |
theFile := (CurrentReadOnlySourceFiles at: (sourceFileNumber ifNil: [ ^nil ])) ifNil: [ ^nil ].
+ theFile size <= filePositionHi ifTrue: [
+ "SourceFiles might have been appended to since theFile was opened. Flush the written data and reopen theFile to make it see the changes."
+ (SourceFiles at: sourceFileNumber) flush.
+ theFile reopen. "Currently the only way to re-read the size field of a read-only file on unix..." ].
theFile size < filePositionHi ifTrue: [
self error: 'RemoteString past end of file' ].