| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent cfadd9e commit f2254af
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -653,7 +653,7 @@ def _to_relative_path(self, path: PathLike) -> PathLike: | |||
| 653 | 653 | return path | |
| 654 | 654 | if self.repo.bare: | |
| 655 | 655 | raise InvalidGitRepositoryError("require non-bare repository") | |
| 656 | - if not str(path).startswith(str(self.repo.working_tree_dir)): | ||
| 656 | + if not osp.normpath(str(path)).startswith(osp.normpath(str(self.repo.working_tree_dir))): | ||
| 657 | 657 | raise ValueError("Absolute path %r is not in git repository at %r" % (path, self.repo.working_tree_dir)) | |
| 658 | 658 | return os.path.relpath(path, self.repo.working_tree_dir) | |
| 659 | 659 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments