[BUG]? FileDirectory>>directoryContentsFor:
Bijan Parsia
bparsia at email.unc.edu
Tue Mar 13 00:33:24 UTC 2001
I'm not entirely sure this is a bug, but it certainly seems like
inconsistent and possibly unwanted behavior. Well, *I* don't want it.
If #directoryContentsFor: succeeds, it returns a possible empty Array. If
the primative #primLookupEntryIn:index: fails, it returns the symbol
#badDirectoryPath (not an exception!). #directoryContentsFor: thereupon
returns a Fresh, Empty OrderedCollection.
So, in order:
If it's going to act as if a bad directoy is empty, shouldn't
it return an array?
Are bad directories empty? It seems that *some* sort of error or
exception should be signaled, though I don't want to make things
more complicated :) (Remember: I hate exceptions.)
Anyone up for a total reworking of the whole file stuff?
Fixes respectively:
Change:
#badDirectoryPath = entryArray
ifTrue: [^ OrderedCollection new].
to:
#badDirectoryPath = entryArray
ifTrue: [^ Array new].
Gawd, I don't know. I hate exceptions
Someone else's job, definitely. You don't want me to go
there. Really. I'll kibbitz and whine, though.
Cheers,
Bijan Parsia.
More information about the Squeak-dev
mailing list
|