[Pkg] The Trunk: Files-ul.172.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Oct 9 22:22:58 UTC 2017


Levente Uzonyi uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-ul.172.mcz

==================== 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') -----
  text 
  	"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' ].
  	^theFile
  		position: filePositionHi;
  		nextChunkText!



More information about the Packages mailing list