Skip to content

Commit 864eafc

Browse files
committed
Reject rooted Windows targets, not just is_absolute() ones.
1 parent 911928b commit 864eafc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dfetch/vcs/archive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ def _is_unsafe_symlink_target(target: str) -> bool:
378378
win = pathlib.PureWindowsPath(target)
379379
return (
380380
posix.is_absolute()
381-
or win.is_absolute()
381+
or bool(win.anchor)
382382
or any(part == ".." for part in posix.parts)
383383
or any(part == ".." for part in win.parts)
384384
)

0 commit comments

Comments
 (0)