From 0bca13947be9f55b7456cc78e2ba979bd7aa1c8c Mon Sep 17 00:00:00 2001 From: Dominic Cleal Date: Wed, 15 Mar 2017 10:24:00 +0000 Subject: Permit double slash in absolute/Unix path types --- types/unixpath.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'types/unixpath.pp') diff --git a/types/unixpath.pp b/types/unixpath.pp index 76f2c17..ec3bf7d 100644 --- a/types/unixpath.pp +++ b/types/unixpath.pp @@ -1,2 +1,2 @@ # this regex rejects any path component that is a / or a NUL -type Stdlib::Unixpath = Pattern[/^\/([^\/\0]+(\/)?)+$/] +type Stdlib::Unixpath = Pattern[/^\/([^\/\0]+\/*)+$/] -- cgit v1.2.3 From 51c9dc52cf68fcb128c5324d3642620100a44d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Kr=C3=B6ger?= Date: Thu, 31 Aug 2017 14:18:04 +0200 Subject: Allow root as valid UNIX path Since the purpose of this validation type is to check if the given parameter is a valid UNIX path it should also cover the root path "slash" since it might be possible that it is specified as a target directory. --- types/unixpath.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'types/unixpath.pp') diff --git a/types/unixpath.pp b/types/unixpath.pp index ec3bf7d..4cd6f01 100644 --- a/types/unixpath.pp +++ b/types/unixpath.pp @@ -1,2 +1,2 @@ # this regex rejects any path component that is a / or a NUL -type Stdlib::Unixpath = Pattern[/^\/([^\/\0]+\/*)+$/] +type Stdlib::Unixpath = Pattern[/^\/([^\/\0]+\/*)*$/] -- cgit v1.2.3