Even considering the danger of looking like a sleazy bootlicker after your broad hint I did a review:
* the second version fails the SUnit FileDirectoryTest * first version passes the test and makes things faster without fix: Testing 2719 entries in 2 minutes with fix: Testing 2719 entries in under a second
Alex
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?
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@lists.squeakfoundation.org [mailto:squeak-dev-bounces@lists.squeakfoundation.org] On Behalf Of tim@sumeru.stanford.edu Sent: Thursday, April 29, 2004 10:00 PM To: squeak-dev@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?
squeak-dev@lists.squeakfoundation.org