In the case of a circular symlink, technically it's still correct to return non-nil. ``` ls -l /tmp/foo total 0 lrwxrwxrwx 1 me me 9 SepĀ  1 10:59 foo -> /tmp/foo/ ``` In this case: ``` ;;; because (file-equal-p "/tmp/foo/foo/" "/tmp/foo/") => t ;;; therefore (my-parent-directory "/tmp/foo/foo/") ; (the equal version) => "/tmp/foo/" (file-parent-directory "/tmp/foo/foo/") => nil ``` Obviously, the `equal` version fits our expectation better, although that's a mistake at the time of link creation, "/tmp/foo/foo"'s parent still exists and not a nil value. Not to mention `file-equal-p` needs an active TRAMP connection for remote files. -- Daanturo.