about summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
authorSilvan Mosberger <silvan.mosberger@tweag.io>2023-07-20 22:10:39 +0200
committerSilvan Mosberger <silvan.mosberger@tweag.io>2023-07-26 23:20:19 +0200
commitd7bf0d777a0edba5a6c87d59e9b7516c796fcd1f (patch)
treea240a767d663b9b98179976e6ebd9a23b7b87a30 /lib
parentb42e178ed4ba33925a474644f5bc54723b2ff15f (diff)
lib.path.subpath.isValid: Add definition of a subpath
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/path/default.nix3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/path/default.nix b/lib/path/default.nix
index 1300f0f09011d..24a7f85affc1d 100644
--- a/lib/path/default.nix
+++ b/lib/path/default.nix
@@ -319,6 +319,9 @@ in /* No rec! Add dependencies on this file at the top. */ {
 
   /* Whether a value is a valid subpath string.
 
+  A subpath string points to a specific file or directory within an absolute base directory.
+  It is a stricter form of a relative path that excludes `..` components, since those could escape the base directory.
+
   - The value is a string
 
   - The string is not empty