pathie-cpp icon indicating copy to clipboard operation
pathie-cpp copied to clipboard

Handle ENOTDIR errno in Path::exists()

Open TryExceptElse opened this issue 4 years ago • 0 comments

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.

TryExceptElse avatar Nov 26 '21 17:11 TryExceptElse