]> Lady’s Gitweb - Shushe/commitdiff
Disallow a few more characters in file·names
authorLady <redacted>
Fri, 19 Jan 2024 01:16:04 +0000 (20:16 -0500)
committerLady <redacted>
Fri, 19 Jan 2024 01:16:04 +0000 (20:16 -0500)
- 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).

GNUmakefile
README.markdown

index bbeffb0ded2685ae78b8d597924531ae2233ef9b..ee342ec1a1f627026ce2df8f527b0775ddd3a3c0 100644 (file)
@@ -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.
index 400679f090097a8bbb2368fc438a55c6a5c57084..95f6954adf6de627ab19e93c620329efb203f852 100644 (file)
@@ -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.
 
This page took 0.026227 seconds and 4 git commands to generate.