diff options
author | tv <tv@krebsco.de> | 2016-07-03 19:41:31 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-07-03 19:41:31 +0200 |
commit | 57098e472a1677883b7f95d0d0b5c815ca1b2b3b (patch) | |
tree | d0972a879b5ff68f63e0373782c6413d1695edc1 | |
parent | 9962ba1036945652c1b1cfd661d92377b4dc691e (diff) |
absolute-pathname: check stringLength > 0
-rw-r--r-- | krebs/4lib/types.nix | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/krebs/4lib/types.nix b/krebs/4lib/types.nix index 0d5b51f76..be0acd584 100644 --- a/krebs/4lib/types.nix +++ b/krebs/4lib/types.nix @@ -342,7 +342,9 @@ types // rec { absolute-pathname = mkOptionType { name = "POSIX absolute pathname"; check = x: let xs = splitString "/" x; xa = head xs; in - isString x && (xa == "/" || (xa == "" && all filename.check (tail xs))); + isString x + && stringLength x > 0 + && (xa == "/" || (xa == "" && all filename.check (tail xs))); merge = mergeOneOption; }; |