Skip to content

Commit

Permalink
WIP: strip Windows device drive prefix for depfile entries
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrake committed Sep 17, 2024
1 parent 407d12d commit 3c7586f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/phylum/ci/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def __post_init__(self, _path):
msg = "Provided dependency file path is not `str` or `Path`"
raise TypeError(msg)

# Naively remove the Windows device drive prefix `\\?\` when present
self.path = Path(str(self.path).removeprefix("\\\\?\\"))

def __repr__(self) -> str:
"""Return a debug printable string representation of the `DepfileEntry` object."""
# `PurePath.relative_to()` requires `self` to be the subpath of the argument, but `os.path.relpath()` does not.
Expand Down

0 comments on commit 3c7586f

Please sign in to comment.