The Trunk: Files-fbs.127.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-fbs.127.mcz

commits-2
Frank Shearar uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-fbs.127.mcz

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

Name: Files-fbs.127
Author: fbs
Time: 18 July 2013, 5:34:23.068 pm
UUID: 0575c203-6356-9141-8385-5e619fb6d660
Ancestors: Files-fbs.126

.... and move FileDirectory class>>openSources:forImage: to System-Files.

=============== Diff against Files-fbs.126 ===============

Item was removed:
- ----- Method: FileDirectory class>>openSources:forImage: (in category 'system start up') -----
- openSources: fullSourcesName forImage: imageName
- "We first do a check to see if a compressed version ofthe sources file is present.
- Open the .sources file read-only after searching in:
- a) the directory where the VM lives
- b) the directory where the image came from
- c) the DefaultDirectory (which is likely the same as b unless the SecurityManager has changed it).
- "
-
- | sources fd sourcesName |
- (fullSourcesName endsWith: 'sources') ifTrue:
- ["Look first for a sources file in compressed format."
- sources := self openSources: (fullSourcesName allButLast: 7) , 'stc'
- forImage: imageName.
- sources ifNotNil: [^ CompressedSourceStream on: sources]].
-
- sourcesName := FileDirectory localNameFor: fullSourcesName.
- "look for the sources file or an alias to it in the VM's directory"
- fd := FileDirectory on: SmalltalkImage current vmPath.
- (fd fileExists: sourcesName)
- ifTrue: [sources := fd readOnlyFileNamed: sourcesName].
- sources ifNotNil: [^ sources].
- "look for the sources file or an alias to it in the image directory"
- fd := FileDirectory on: (FileDirectory dirPathFor: imageName).
- (fd fileExists: sourcesName)
- ifTrue: [sources := fd readOnlyFileNamed: sourcesName].
- sources ifNotNil: [^ sources].
- "look for the sources in the current directory"
- fd := DefaultDirectory.
- (fd fileExists: sourcesName)
- ifTrue: [sources := fd readOnlyFileNamed: sourcesName].
- "sources may still be nil here"
- ^sources
- !