Skip to content

Commit 51c9dc5

Browse files
committed
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.
1 parent 7404ed3 commit 51c9dc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types/unixpath.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# this regex rejects any path component that is a / or a NUL
2-
type Stdlib::Unixpath = Pattern[/^\/([^\/\0]+\/*)+$/]
2+
type Stdlib::Unixpath = Pattern[/^\/([^\/\0]+\/*)*$/]

0 commit comments

Comments
 (0)