Skip to content

Commit 0a19fb5

Browse files
committed
fix cov
1 parent 95e4276 commit 0a19fb5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/idom/backend/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ def run(
6060

6161
def safe_client_build_dir_path(path: str) -> Path:
6262
"""Prevent path traversal out of :data:`CLIENT_BUILD_DIR`"""
63-
if path in ("", "/"):
64-
return CLIENT_BUILD_DIR / "index.html"
65-
else:
66-
return traversal_safe_path(CLIENT_BUILD_DIR, *path.split("/"))
63+
return traversal_safe_path(
64+
CLIENT_BUILD_DIR,
65+
*("index.html" if path in ("", "/") else path).split("/"),
66+
)
6767

6868

6969
def safe_web_modules_dir_path(path: str) -> Path:

0 commit comments

Comments
 (0)