| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c6a018b commit cc80e6b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -56,7 +56,8 @@ def __call__(self, stage_blob: Tuple[StageType, Blob]) -> bool: | |||
| 56 | 56 | blob_path: Path = blob_pathlike if isinstance(blob_pathlike, Path) else Path(blob_pathlike) | |
| 57 | 57 | for pathlike in self.paths: | |
| 58 | 58 | path: Path = pathlike if isinstance(pathlike, Path) else Path(pathlike) | |
| 59 | - if path.is_relative_to(blob_path): | ||
| 59 | + # TODO: Change to use `PosixPath.is_relative_to` once Python 3.8 is no longer supported. | ||
| 60 | + if all(map(lambda t: t[0] == t[1], zip(path.parts, blob_path.parts))): | ||
| 60 | 61 | return True | |
| 61 | 62 | return False | |
| 62 | 63 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments