Skip to content

feat(glob): split base dir on path component to avoid walking from cwd#991

Open
SAY-5 wants to merge 1 commit into
Keats:masterfrom
SAY-5:fix/glob-base-dir-split
Open

feat(glob): split base dir on path component to avoid walking from cwd#991
SAY-5 wants to merge 1 commit into
Keats:masterfrom
SAY-5:fix/glob-base-dir-split

Conversation

@SAY-5
Copy link
Copy Markdown

@SAY-5 SAY-5 commented May 19, 2026

Closes #740. load_from_glob previously split the glob at the first * character, which can leave the base directory ending mid-component (e.g. templ*/*.html yielded base templ) and makes globwalk walk from the cwd. This splits at the last slash before the first wildcard so the base directory is always a real path component.

Keats said "I'd take a PR for that!" in #740 (comment). Added a regression test glob_base_dir_splits_on_path_component; all existing glob tests still pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

loading template files can easily get into an infinite loop

1 participant