Skip to content

Commit 437e682

Browse files
committed
fix: delete snapshot should not delete file share
1 parent 0929b24 commit 437e682

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/azurefile/controllerserver.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1074,7 +1074,9 @@ func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequ
10741074
if err != nil {
10751075
return nil, status.Errorf(codes.Internal, "failed to get snapshot client for subID(%s): %v", subsID, err)
10761076
}
1077-
deleteErr = fileshareClient.Delete(ctx, rgName, accountName, fileShareName, nil)
1077+
deleteErr = fileshareClient.Delete(ctx, rgName, accountName, fileShareName, &armstorage.FileSharesClientDeleteOptions{
1078+
XMSSnapshot: to.Ptr(snapshot),
1079+
})
10781080
}
10791081

10801082
if deleteErr != nil {

0 commit comments

Comments
 (0)