From: Lady <redacted>
Date: Thu, 11 Jan 2024 01:19:32 +0000 (-0500)
Subject: Do not follow symbolic links with `find`
X-Git-Tag: 0.2.4~3
X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/d37062ed3c7a06adb006b405441d79fb0e134451?ds=sidebyside;hp=2d4cbd1e2235a49728ca6ccb5a73c15fb34736d6

Do not follow symbolic links with `find`

⛩️📰 书社 expects that source files exist within `SRCDIR` and includes
exist within `INCLUDEDIR`. Following symlinks can break this
assumption. Other commands should follow symlinks by default, so there
shouldn’t be any need to resolve them this early in the process.
---

diff --git a/GNUmakefile b/GNUmakefile
index 9ae7a92..a674178 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -134,10 +134,10 @@ MAGICDIR := $(patsubst ./%,%,$(THISDIR)/magic)
 
 # Configuration of `find´.
 #
-# By default, `find´ will follow symlinks and use extended regular
-# expressions, ignoring hidden files and those which begin with a
-# period.
-FINDOPTS := -LE
+# By default, `find´ will not follow symlinks and will use extended
+# regular expressions, ignoring hidden files and those which begin with
+# a period.
+FINDOPTS := -PE
 FINDRULES := -flags -nohidden -and -not -name '.*'
 
 # The list of parsers for plaintext file types.
diff --git a/README.markdown b/README.markdown
index 28b8b46..6bfa987 100644
--- a/README.markdown
+++ b/README.markdown
@@ -152,7 +152,7 @@ The following additional variables can be used to control the behaviour
 
 - **`FINDOPTS`:**
   Options to pass to `find` when searching for source files (default:
-    `-LE`).
+    `-PE`).
 
 - **`FINDRULES`:**
   Rules to use with `find` when searching for source files (default: