[BUG] FileDirectory>>exists
Stephen Pair
stephen at pairhome.net
Wed May 21 03:15:42 UTC 2003
Anthony Adachi wrote:
>Stephen Pair wrote:
>
>> It should (IMO) be made to pass on the Mac as well.
>>
>>
>
>It doesn't and fails running on a Mac OS 9.1 and
>Squeak 3.5. Upon stepping into the failing test I
>narrowed it down to this assertion:
>
>self shouldnt: [(FileDirectory on: testFileName)
>exists]]
>
>Also, at that point, looking in the Finder I can see
>that "zTestDir:zDirExistsTest.testing." exists.
>
>Anthony
>
That's correct...this test passes on Unix and Windows systems, but fails
on Mac OSX (and apparently 9.1 as well). There is a bug in the Mac
implementation that should be corrected. That was why I wrote the test
and posted the message. The problem is that the Mac implementation of
the primitive FilePlugin>>primitiveDirectoryLookup (dir_lookup() is the
platform specific C function) is simply checking to see whether there is
an entry named like the FileDirectory without regard to whether or not
the entry is actually a directory. As I mentioned earlier, I think the
behavior on Windows and Unix is correct, and the Mac implementation
needs to be corrected to conform to the Windows and Unix implementations.
This test needs to be added to the FileDirectoryTests so that we can
make sure this issue doesn't manifest itself again in the future.
- Stephen
More information about the Squeak-dev
mailing list
|