@@ -297,21 +297,21 @@ func (s *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, k
297297 return nil , errors .Wrap (err , "failed to create snapshot" )
298298 }
299299
300- if kind == snapshots .KindActive {
301- parentLayerPaths := s .parentIDsToParentPaths (newSnapshot .ParentIDs )
300+ // if kind == snapshots.KindActive {
301+ parentLayerPaths := s .parentIDsToParentPaths (newSnapshot .ParentIDs )
302302
303- var parentPath string
304- if len (parentLayerPaths ) != 0 {
305- parentPath = parentLayerPaths [0 ]
306- }
307-
308- if err := hcsshim .CreateSandboxLayer (s .info , newSnapshot .ID , parentPath , parentLayerPaths ); err != nil {
309- return nil , errors .Wrap (err , "failed to create sandbox layer" )
310- }
303+ var parentPath string
304+ if len (parentLayerPaths ) != 0 {
305+ parentPath = parentLayerPaths [0 ]
306+ }
311307
312- // TODO(darrenstahlmsft): Allow changing sandbox size
308+ if err := hcsshim .CreateSandboxLayer (s .info , newSnapshot .ID , parentPath , parentLayerPaths ); err != nil {
309+ return nil , errors .Wrap (err , "failed to create sandbox layer" )
313310 }
314311
312+ // TODO(darrenstahlmsft): Allow changing sandbox size
313+ //}
314+
315315 if err := t .Commit (); err != nil {
316316 return nil , errors .Wrap (err , "commit failed" )
317317 }
0 commit comments