windows compat - use anchor not root

This commit is contained in:
sneakers-the-rat 2024-09-25 17:14:13 -07:00
parent ea2d1238ed
commit 960d4f70a1
Signed by untrusted user who does not match committer: jonny
GPG key ID: 6DCB96EF1E4D232D

View file

@ -75,8 +75,8 @@ def _relativize_paths(
# or that are at the filesystem root (eg like /data) # or that are at the filesystem root (eg like /data)
if ( if (
not path.exists() not path.exists()
or (resolved.is_dir() and str(resolved.parent) == resolved.root) or (resolved.is_dir() and str(resolved.parent) == resolved.anchor)
or relative_to.root != resolved.root or relative_to.anchor != resolved.anchor
): ):
return v return v
return str(relative_path(path, relative_to)) return str(relative_path(path, relative_to))