The Trunk: Files-ul.172.mcz

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

The Trunk: Files-ul.172.mcz

Levente Uzonyi uploaded a new version of Files to project The Trunk:

==================== Summary ====================

Name: Files-ul.172
Author: ul
Time: 10 October 2017, 12:21:24.555739 am
UUID: 0eb643b4-cff4-4874-8025-94d83d768448
Ancestors: Files-eem.171

- 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' ].
  position: filePositionHi;