Subject: Re: Root parent link
From: Pengcheng Wu (email@example.com)
Date: Mon Feb 17 2003 - 10:19:49 EST
If the parent is null (must be root), then always keep the current
diretory pointer to root.
On Sun, 16 Feb 2003, Roman Feldman wrote:
> As of now the parent link in root is set to null. Thus calling cd ..
> inside root will throw a null pointer exception. I can only think of
> two ways of dealing with it. One would be to set root's parent equal to
> itself thus calling cd .. will not cause a problem, Unfortunately I
> don't know if any traversals depend on that link being null. The other
> way would be to just catch the null pointer exception in the cd function
> and continue running the code as is. The second one seems less painful
> and least likely to effect other parts of the code. Is this something
> we need to worry about at all?
This archive was generated by hypermail 2b28 : Mon Feb 17 2003 - 10:19:50 EST