[BUG][FIX] Cannot open files in a Mac volume's root

Bert Freudenberg bert at impara.de
Mon Mar 22 16:51:38 UTC 2004


Am 22.03.2004 um 15:23 schrieb John M McIntosh:

> Right and I'll resubmit the patch that might fix it, someone might 
> want to test (again) and then someone might want  to stick it in the 
> update stream.
> Plus for completeness I'll attach the sunit test stephane ducasse & 
> Karl Ramberg wrote to test it

I don't think that'll work. Consider this:

	FileDirectory default
		--> MacHFSPlusFileDirectory on 'Macintosh HD:Users:bert:Squeak'

	FileDirectory default directoryNamed: 'Macintosh HD:bla'
		-->  MacHFSPlusFileDirectory on 'Macintosh HD:bla'

So far, so fine. But:

	FileDirectory default directoryNamed: 'Macintosh HD'
		--> MacHFSPlusFileDirectory on 'Macintosh 
HD:Users:bert:Squeak:Macintosh HD'

instead of

		--> MacHFSPlusFileDirectory on 'Macintosh HD'

as your #isAbsolute: would imply.

Unfortunately, this idiom is used everywhere to look into 
subdirectories of the image directory.

> !MacFileDirectory class methodsFor: 'class initialization' stamp: 'JMM 
> 6/18/2003 23:33'!
> isAbsolute: fileName
> "[...]"
> 	fileName first = $: ifTrue: [^false].
> 	(fileName includes: $:) ifTrue: [^true].
> 	(fileName size > 0) ifTrue: [^true].
> 	^false! !
>

TerseMan sayz:

	isAbsolute: fileName
		^fileName first ~= $:

... which is absolutely equivalent to the code above ;-)

- Bert -




More information about the Squeak-dev mailing list