From: Lady Date: Fri, 19 Jan 2024 01:16:04 +0000 (-0500) Subject: Disallow a few more characters in file·names X-Git-Tag: 0.4.1~5 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/4e4c927c458dd77fd0f6cdac5be14f964525e8b1?hp=49d18f0e25e2051303029e5cee01c87cf5413231 Disallow a few more characters in file·names - Make will try to expand the glob characters `*`, `?`, and `[` when followed by `]`. Forbid all of these (including both brackets in all cases for simplicity). - `#` and `;` are dangerous in make prerequisites (at least under secondary expansion). --- diff --git a/GNUmakefile b/GNUmakefile index bbeffb0..ee342ec 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -150,7 +150,7 @@ MAGICDIR := $(patsubst ./%,%,$(THISDIR)/magic) # # By default, `find´ will ignore hidden files, those which begin with a # period, and those which are likely to cause problems for `make´. -FINDRULES := -flags -nohidden -and ! '(' '(' -name '[.-]*' -or -name '*[:|$$%]*' ')' -and -prune ')' +FINDRULES := -flags -nohidden -and ! '(' '(' -name '[.-]*' -or -name '*[][*?:|$$%\#;]*' ')' -and -prune ')' FINDINCLUDERULES := $(FINDRULES) # The list of parsers for plaintext file types. diff --git a/README.markdown b/README.markdown index 400679f..95f6954 100644 --- a/README.markdown +++ b/README.markdown @@ -161,8 +161,8 @@ The following additional variables can be used to control the behaviour - **`FINDRULES`:** Rules to use with `find` when searching for source files. The default ignores hidden files, those that start with a period or - hyphen‐minus, and those which contain a pipe, buck, percent, or - colon. + hyphen‐minus, and those which contain a pipe, buck, percent, + bracket, hash, asterisk, eroteme, semi, or colon. - **`FINDINCLUDERULES`:** Rules to use with `find` when searching for includes (default: @@ -208,10 +208,11 @@ Text formats with associated X·S·L·T parsers are wrapped in a H·T·M·L Source files whose media type does not have an associated X·S·L·T parser are considered “assets” and will not be transformed. -**☡ For compatibility with this program, source filenames must not - contain Ascii whitespace, colons (`:`), pipes (`|`), bucks (`$`), - percents (`%`) or control characters, and must not begin with a - hyphen‐minus (`-`).** +**☡ For compatibility with this program, source file·names must not + contain Ascii white·space, colons (`:`), semis (`;`), pipes (`|`), + bucks (`$`), percents (`%`), hashes (`#`), asterisks (`*`), brackets + (`[` or `]`), erotemes (`?`), or control characters, and must not + begin with a hyphen‐minus (`-`).** The former characters have the potential to conflict with make syntax, and a leading hyphen‐minus is confusable for a command‐line argument.