Skip to content

Commit b7f0630

Browse files
committed
fix: delete snapshot should not delete file share
1 parent 991b98b commit b7f0630

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
@@ -1086,7 +1086,9 @@ func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequ
10861086
if err != nil {
10871087
return nil, status.Errorf(codes.Internal, "failed to get snapshot client for subID(%s): %v", subsID, err)
10881088
}
1089-
deleteErr = fileshareClient.Delete(ctx, rgName, accountName, fileShareName, nil)
1089+
deleteErr = fileshareClient.Delete(ctx, rgName, accountName, fileShareName, &armstorage.FileSharesClientDeleteOptions{
1090+
XMSSnapshot: to.Ptr(snapshot),
1091+
})
10901092
}
10911093

10921094
if deleteErr != nil {

0 commit comments

Comments
 (0)