Use MkdirAll when create snapshots directory
Otherwise we'll get: ``` mkdir /var/lib/containerd/snapshot/overlay/snapshots: file exists ``` when we already have snapshots there. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
This commit is contained in:
parent
1ceb1595e7
commit
a0dda70b2d
1 changed files with 1 additions and 1 deletions
|
@ -49,7 +49,7 @@ func NewSnapshotter(root string) (snapshot.Snapshotter, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if err := os.Mkdir(filepath.Join(root, "snapshots"), 0700); err != nil {
|
||||
if err := os.MkdirAll(filepath.Join(root, "snapshots"), 0700); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue