Comment 6 for bug 1533766

Revision history for this message
Faré (fahree) wrote :

Well, yes, there could be another argument VISITED that when NIL does nothing, when T gets replaced by a fresh hash-table, and when a hash-table contains a set of visited filenames.

No, I don't think the DIRECTORY argument is always absolute, physical, or anything.

Whether symbolic links are resolved is implementation-dependent. I try not to on supported implementations (like CCL), but most implementations follow symlinks.

Yes, you will need to canonicalize pathnames. Note that although the CLHS says DIRECTORY returns TRUENAMEs, some implementations (e.g. CLISP, I believe) actually have different canonicalization rules for DIRECTORY and for TRUENAME — and of course, if you don't follow symlinks or return truenames, as would be nice, then don't expect a truename to be returned. Therefore, if/when you use VISITED, be sure to canonicalize with TRUENAME except on supported implementations — but then again, TRUENAME may fail (e.g. some ancestor .. lacks access rights), and what do you do then?

It's a cesspool of fail to try to do that portably, which is why I didn't even try. It works well enough for ASDF purposes. For more, go IOlib.