krebs types.filename: admit <underscore>

This commit is contained in:
tv 2016-06-11 16:11:22 +02:00
parent e48ecf1e1c
commit c80aee7a0b

View File

@ -325,10 +325,7 @@ types // rec {
# POSIX.12013, 3.278 Portable Filename Character Set
filename = mkOptionType {
name = "POSIX filename";
check = let
filename-chars = stringToCharacters
"-.0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
in s: all (flip elem filename-chars) (stringToCharacters s);
check = x: match "[0-9A-Za-z._-]+" x != null;
merge = mergeOneOption;
};