From 960d4f70a16123c3a6c85c42dc420a69c93dd5a8 Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Wed, 25 Sep 2024 17:14:13 -0700 Subject: [PATCH] windows compat - use anchor not root --- src/numpydantic/serialization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/numpydantic/serialization.py b/src/numpydantic/serialization.py index 1682a69..94c627c 100644 --- a/src/numpydantic/serialization.py +++ b/src/numpydantic/serialization.py @@ -75,8 +75,8 @@ def _relativize_paths( # 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))