Update snapshot mkdir to check for directory exist
When starting up a snapshot driver on subsequent runs, the mkdir call will return an exist error, this can be safely ignored. Signed-off-by: Derek McGowan <derek@mcgstyle.net>
This commit is contained in:
@@ -49,7 +49,7 @@ func NewSnapshotter(root string) (snapshot.Snapshotter, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := os.MkdirAll(filepath.Join(root, "snapshots"), 0700); err != nil {
|
||||
if err := os.Mkdir(filepath.Join(root, "snapshots"), 0700); err != nil && !os.IsExist(err) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user