Skip to content

Commit 96f306e

Browse files
Merge pull request #2900 from Ace-Tang/fix_snapshot_remove
fix: miss remove temp file in createSnapshot
2 parents 804faea + 7faaa64 commit 96f306e

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

snapshots/native/native.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,8 @@ func (o *snapshotter) Walk(ctx context.Context, fn func(context.Context, snapsho
241241
return storage.WalkInfo(ctx, fn)
242242
}
243243

244-
func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, key, parent string, opts []snapshots.Opt) ([]mount.Mount, error) {
244+
func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, key, parent string, opts []snapshots.Opt) (_ []mount.Mount, err error) {
245245
var (
246-
err error
247246
path, td string
248247
)
249248

snapshots/overlay/overlay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func (o *snapshotter) getCleanupDirectories(ctx context.Context, t storage.Trans
350350
return cleanup, nil
351351
}
352352

353-
func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, key, parent string, opts []snapshots.Opt) ([]mount.Mount, error) {
353+
func (o *snapshotter) createSnapshot(ctx context.Context, kind snapshots.Kind, key, parent string, opts []snapshots.Opt) (_ []mount.Mount, err error) {
354354
ctx, t, err := o.ms.TransactionContext(ctx, true)
355355
if err != nil {
356356
return nil, err

0 commit comments

Comments
 (0)