Skip to content

Commit

Permalink
Improve file path validation for Windows platform: #12
Browse files Browse the repository at this point in the history
  • Loading branch information
thombashi committed Mar 28, 2020
1 parent 307f5c9 commit add5e5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pathvalidate/_filepath.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ def validate_abspath(self, value: PathType) -> None:
reason=ErrorReason.MALFORMED_ABS_PATH,
)

if any([self._is_windows() and is_nt_abs, self._is_linux() and is_posix_abs]):
return

if self._is_universal() and any([is_posix_abs, is_nt_abs]):
raise err_object

Expand Down

0 comments on commit add5e5c

Please sign in to comment.