We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Prelude System.Directory> :!mkdir "a-directory" Prelude System.Directory> :!ln -s "a-directory" "a-symlink-to-a-directory" Prelude System.Directory> doesDirectoryExist "a-symlink-to-a-directory" True Prelude System.Directory> removeDirectory "a-symlink-to-a-directory" *** Exception: a-symlink-to-a-directory: removeDirectory: inappropriate type (Not a directory)
The text was updated successfully, but these errors were encountered:
...what should happen instead?
Sorry, something went wrong.
Well, this behavior is at least consistent with how Python's os.rmdir and os.path.isdir operate.
os.rmdir
os.path.isdir
This is also consistent with the way the GNU coreutils operate:
$ mkdir a-directory $ ln -s a-directory a-symlink-to-a-directory $ test -d a-directory/ $ echo $? 0 $ test -d a-symlink-to-a-directory/ $ echo $? 0 $ rmdir a-symlink-to-a-directory rmdir: failed to remove ‘a-symlink-to-a-directory’: Not a directory
Pending a compelling reason to change the behavior of removeDirectory, I'm going to close this issue.
removeDirectory
Agree.
argiopetech
No branches or pull requests
The text was updated successfully, but these errors were encountered: