summaryrefslogtreecommitdiffstats
path: root/krebs/4lib
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-06-11 16:29:18 +0200
committertv <tv@krebsco.de>2016-06-11 16:35:13 +0200
commitcda4c2d96b70c296ad97e4d9118aa55ea7c3a594 (patch)
tree90d8fdf340e523113d4b564d8a4b53d077ec77f2 /krebs/4lib
parentc80aee7a0b5f3bc064e7f02d9c3d10dc83f1ce73 (diff)
krebs types.filename: maximize strictness
Diffstat (limited to 'krebs/4lib')
-rw-r--r--krebs/4lib/types.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix
index b048f48d8..628555a9e 100644
--- a/krebs/4lib/types.nix
+++ b/krebs/4lib/types.nix
@@ -325,7 +325,7 @@ types // rec {
# POSIX.1‐2013, 3.278 Portable Filename Character Set
filename = mkOptionType {
name = "POSIX filename";
- check = x: match "[0-9A-Za-z._-]+" x != null;
+ check = x: match "([0-9A-Za-z._])[0-9A-Za-z._-]*" x != null;
merge = mergeOneOption;
};
@@ -347,6 +347,6 @@ types // rec {
# POSIX.1-2013, 3.431 User Name
username = mkOptionType {
name = "POSIX username";
- check = s: filename.check s && substring 0 1 s != "-";
+ check = filename.check;
};
}