Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1350 #1353

Merged
merged 1 commit into from
Jan 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions lib/core/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,23 @@ def parse_options():
opt.skip_on_status = _parse_status_codes(opt.skip_on_status)
opt.prefixes = tuple(strip_and_uniquify(opt.prefixes.split(",")))
opt.suffixes = tuple(strip_and_uniquify(opt.suffixes.split(",")))
opt.subdirs = strip_and_uniquify(
[
subdir.lstrip("/") + ("" if not subdir or subdir.endswith("/") else "/")
for subdir in opt.subdirs.split(",")
]
opt.subdirs = map(
lambda subdir: subdir.lstrip("/"),
strip_and_uniquify(
[
subdir if subdir.endswith("/") else subdir + "/"
for subdir in opt.subdirs.split(",")
]
),
)
opt.exclude_subdirs = strip_and_uniquify(
[
subdir.lstrip("/") + ("" if not subdir or subdir.endswith("/") else "/")
for subdir in opt.exclude_subdirs.split(",")
]
opt.exclude_subdirs = map(
lambda subdir: subdir.lstrip("/"),
strip_and_uniquify(
[
subdir if subdir.endswith("/") else subdir + "/"
for subdir in opt.exclude_subdirs.split(",")
]
),
)
opt.exclude_sizes = {size.strip().upper() for size in opt.exclude_sizes.split(",")}

Expand Down
Loading