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:
Qiang Huang 2017-04-05 00:52:46 -04:00
parent 1ceb1595e7
commit a0dda70b2d
1 changed files with 1 additions and 1 deletions

View File

@ -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
}