Skip to content

Commit 044c5a3

Browse files
committed
Fix for when backend-path is the project root
1 parent 00ef334 commit 044c5a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pyproject_hooks/_impl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def norm_and_check(source_tree: str, requested: str) -> str:
119119
abs_requested = os.path.normpath(os.path.join(abs_source, requested))
120120
norm_source = os.path.normcase(abs_source)
121121
norm_requested = os.path.normcase(abs_requested)
122-
if not norm_requested.startswith(norm_source + os.sep):
122+
if not (norm_requested + os.sep).startswith(norm_source + os.sep):
123123
raise ValueError("paths must be inside source tree")
124124

125125
return abs_requested

0 commit comments

Comments
 (0)