[BUG][FIX]AcornFileDirectory fix for 4282 update

Tim Rowledge tim at sumeru.stanford.edu
Tue Aug 28 23:58:10 UTC 2001


The latest 3.1 image uses some odd corners of the directory contents to
find out if a directory path exists. It exposed a problem in the Acorn
VM/low-level stuff that this fixes. It _must_ go in in order to maintain
portability.

tim
-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: EBO: Emulate Brown-Out
-------------- next part --------------
'From Squeak3.1alpha of 7 March 2001 [latest update: #4282] on 28 August 2001 at 4:47:23 pm'!

!AcornFileDirectory methodsFor: 'as yet unclassified' stamp: 'tpr 8/28/2001 16:44'!
directoryContentsFor: fullPath
	"Return a collection of directory entries for the files and directories in the directory with the given path. See primLookupEntryIn:index: for further details."
	"FileDirectory default directoryContentsFor: ''"
	"For Acorn we also make sure that at least the root of the current dir is added - sometimes this is in a filing system that has not been (or cannot be) polled for disc root names"
	| entries extraPath |
	entries _ super directoryContentsFor: fullPath.
	fullPath isEmpty ifTrue:[ extraPath _ self class default containingDirectory.
		(entries includes: extraPath) ifFalse:[entries _ entries copyWith: ( DirectoryEntry name: extraPath fullName creationTime: 0 modificationTime: 0 isDirectory: true fileSize:0)]].
	^entries! !


More information about the Squeak-dev mailing list