Skip to content

Handle ENOTDIR errno in Path::exists()#19

Open
TryExceptElse wants to merge 1 commit intoQuintus:masterfrom
TryExceptElse:improve-path-exists-check
Open

Handle ENOTDIR errno in Path::exists()#19
TryExceptElse wants to merge 1 commit intoQuintus:masterfrom
TryExceptElse:improve-path-exists-check

Conversation

@TryExceptElse
Copy link
Contributor

Previously, Path::exists() would produce an exception when a parent of
the checked path existed, but was not a directory (for example: if
the user called Path("foo/baz.txt").exists() when "foo" was a file).

This change makes Pathie act similarly to path libraries such as
Python's pathlib, which returns false given the same inputs.

Previously, Path::exists() would produce an exception when a parent of
the checked path existed, but was not a directory. For example, if
the user called `Path("foo/baz.txt").exists()` when "foo" was a file.

This change makes Pathie act more similarly to path libraries such as
Python's pathlib, which returns false given the same inputs.
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

Successfully merging this pull request may close these issues.

1 participant