modify modeRegexp to adapt the default spec of containerd

https://github.com/containerd/containerd/blob/master/oci/spec.go#L206, the mode=755
didn't match the pattern modeRegexp = regexp.MustCompile("0[0-7][0-7][0-7]").

Closes #112

Signed-off-by: Juan <xionghuan.cn@gmail.com>
Change-Id: I469e0a68160a1278e34c9e1dbe4b7784c6f97e5a
PiperOrigin-RevId: 219672525
This commit is contained in:
Juan 2018-11-01 11:57:09 -07:00 committed by Shentubot
parent a4cc93c7bf
commit b23cd33682
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ const (
)
// modeRegexp is the expected format of the mode option.
var modeRegexp = regexp.MustCompile("0[0-7][0-7][0-7]")
var modeRegexp = regexp.MustCompile("^0?[0-7][0-7][0-7]$")
// Filesystem is a tmpfs.
//