Skip to content

Commit 29f50ac

Browse files
committed
Ignore parts with spaces, don't remove them
1 parent c18c782 commit 29f50ac

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/murfey/util/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ def sanitise_nonpath(in_string: str) -> str:
6464

6565
def secure_path(in_path: Path, keep_spaces: bool = False) -> Path:
6666
if keep_spaces:
67-
secured_parts = [secure_filename(p) for p in in_path.parts if " " not in p]
67+
secured_parts = [
68+
secure_filename(p) if " " not in p else p for p in in_path.parts
69+
]
6870
else:
6971
secured_parts = [secure_filename(p) for p in in_path.parts]
7072
return Path("/".join(secured_parts))

0 commit comments

Comments
 (0)