bug in File Locator isRoot
Brian Rice
water at tunes.org
Wed Dec 28 10:11:36 PST 2005
The comment for isRoot on File Locator states that it means that the
locator represents either the root directory entry (unlikely, but it
could happen), or a file within that. As long as that's meaningful, I
think I'll keep it in.
I've corrected File RelativeLocator's implementation as you suggest,
to also check the basePath. This fixes your test case and most others
I can think of.
The patch is uploaded - new images will be available shortly.
On Dec 28, 2005, at 7:47 AM, Jeff Sparkes wrote:
> If you create a File Locator with a simple file name, isRoot returns
> true. I think
> it should include the basePath in determining isRoot. Is it even
> possible for a
> File RelativeLocator to be a root? Further inspection shows that File
> and Directory
> are separate classes, so it should be impossible for a File to be
> root.
>
>
> Slate: Growing heap to 6984568 bytes.
> Nil
> Slate 1> addSlot: #f valued: ('slate.image' as: File Locator).
> lobby
> Slate 2> f isRoot.
> True
> Slate 3> f path.
> {"ExtensibleArray"}
> Slate 4> f.
> P'slate.image'
> Slate 5> f basePath.
> ("LogicalDirectory" parentResource: Nil. handle: Nil. readStream: Nil.
> writeStream: Nil.
> locator: P'd:\src\slate\main\'. resolver: [(arity: 0)])
> Slate 6>
--
-Brian
http://tunes.org/~water/brice.vcf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : /archives/slate/attachments/20051228/682d40ca/PGP.pgp
More information about the Slate
mailing list