Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asymmetry between directory-exists-p and directory-pathname-p #12

Closed
renzo-orsini opened this issue Mar 26, 2015 · 1 comment
Closed

Comments

@renzo-orsini
Copy link

directory-exists-p returns non nil for strings that are interpreted as existing directory names, as "" or ".." in unix (the documentation says: "Checks whether the file named by the pathname designator pathspec exists and if it is a directory"). Similarly, (pathname-absolute-p "") return T, or (pathname-relative-p "..") returns T, etc.
directory-pathname-p instead returns nil for unix directory names as "~" or "..", and this is counter-intuitive given the above results. I think that this functions should returns the same result as directory-exists-p for those special strings, since they are valid directory pathnames (at least in unix-like notation).

@stassats
Copy link
Member

directory-pathname-p tells if the pathname designates a directory, not if it's actually a directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants