From c80aee7a0b5f3bc064e7f02d9c3d10dc83f1ce73 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 11 Jun 2016 16:11:22 +0200 Subject: krebs types.filename: admit --- krebs/4lib/types.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'krebs') diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index f65d5b68e..b048f48d8 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -325,10 +325,7 @@ types // rec { # POSIX.1‐2013, 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; }; -- cgit v1.2.3