On 19 Feb 2011, at 07:57, brian wrote:

> I'm trying to convert a Delphi console-mode program which needs to walk 
> directory trees to FP **and Linux** - is there a standard way to detect and 
> handle recursive symlinks, if the user has been daft enough to create them?

Many programs handle this by following symlinks only to a certain maximum 
depth. E.g., they print an error if they have followed 16 or more symlinks 
already. An alternative is to keep track of every directory you have traversed 
(or are traversing) already, and to skipping symlinks pointing to such 
directories.


Jonas_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to