Posted by hussein on July 29, 1999 at 22:15:38:
In Reply to: Path storage "glitch" posted by Jared Anderson on July 29, 1999 at 20:32:45:
: Hey all
: Just noticed a problem with my Find, though thankfully not a FUNCTIONALITY problem ....
: I happened to notice that as I'm passing/storing my "path" string, sometimes it gets multiple subdirectories tagged on to the end of it!!
: EXAMPLE: Say I've got a directory "c:\stuff", which has two subdirectories, "bob" and "pat". "bob" also has subdirectory "hill". [Don't ask me what the names represent, they just "came to me" lol]
: Anyway, let's first say that in "bob\hill" is the file I want, "target.txt".
: When I run my algorithm (Depth-First Search), it finds it, and the output is
: "c:\stuff\bob\hill\target.txt".
: NOW, let's say that instead, the file is in "pat". It still finds the file correctly, but the output is now
: "c:\stuff\bob\hill\pat\target.txt".
: When it's coming back out of the unsuccessful recursion into "bob", the string is not "reverting". Then it goes into the successful recursion into "pat".
the string wont revert - u must only add strings when the search has been successful ...
---
hussein