[BUG][FIX]FileDirectory>directoryExists: a bit silly

Alexander Lazarevic Alexander at Lazarevic.de
Fri Apr 30 08:09:06 UTC 2004


When referring to your first message (1) on this topic from within BFAV,
I wasn't aware that this was sent a while back and that there had been
modidications to the code. In the mail you had two versions of
directoryExists and I was talking about those. Because there was no
changeset I wrongly cut & paste the code from the mail into
FileDirectory>>directoryExists and that did fail on things like

	(FileDirectory on: 'C:') directoryExists: 'WINDOWS'
 
This code from your acorn changeset placed in FileDirectory ...

directoryExists: filenameOrPath
	"if the path is a root,we have to treat it carefully"
	(filenameOrPath endsWith: '$') ifTrue:[^(FileDirectory on:
filenameOrPath) exists].
	^(self directoryNamed: filenameOrPath ) exists

... is much faster than the code currently in the image and passes Sunit
FileDirectoryTest.

Sorry for the confusion.

Alex

(1)
http://lists.squeakfoundation.org/pipermail/squeak-dev/2003-August/06418
2.html

-----Original Message-----
From: squeak-dev-bounces at lists.squeakfoundation.org
[mailto:squeak-dev-bounces at lists.squeakfoundation.org] On Behalf Of
tim at sumeru.stanford.edu
Sent: Thursday, April 29, 2004 10:00 PM
To: squeak-dev at lists.squeakfoundation.org
Subject: [BUG][FIX]FileDirectory>directoryExists: a bit silly



I'm puzzled by the versions you are referring to; whihc code is 'the
second version' that fails the SUnit test' and which is the first  one
that passes? On my RISC OS machine the tests all pass with my
AcornFileDirectory localised change and I didn't change the default
version. So far as I can work out from the code you attached, it is a
variant on an obsolete version ofthe method?





More information about the Squeak-dev mailing list