Skip to content

Commit

Permalink
windows compat - use anchor not root
Browse files Browse the repository at this point in the history
  • Loading branch information
sneakers-the-rat committed Sep 26, 2024
1 parent ea2d123 commit 960d4f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/numpydantic/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def _r_path(v: Any) -> Any:
# or that are at the filesystem root (eg like /data)
if (
not path.exists()
or (resolved.is_dir() and str(resolved.parent) == resolved.root)
or relative_to.root != resolved.root
or (resolved.is_dir() and str(resolved.parent) == resolved.anchor)
or relative_to.anchor != resolved.anchor
):
return v
return str(relative_path(path, relative_to))
Expand Down

0 comments on commit 960d4f7

Please sign in to comment.