Skip to content

Commit

Permalink
fix filter
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Oct 25, 2024
1 parent 4e81694 commit b5d36e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/azurefile/controllerserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,8 @@ func (d *Driver) snapshotExists(ctx context.Context, sourceVolumeID, snapshotNam
}

// List share snapshots.
listSnapshot, err := d.cloud.FileClient.WithSubscriptionID(subsID).ListFileShare(ctx, rgName, accountName, fileShareName, snapshotsExpand)
filter := fmt.Sprintf("startswith(name, %s)", fileShareName)
listSnapshot, err := d.cloud.FileClient.WithSubscriptionID(subsID).ListFileShare(ctx, rgName, accountName, filter, snapshotsExpand)
if err != nil || listSnapshot == nil {
return false, "", time.Time{}, 0, err
}
Expand Down

0 comments on commit b5d36e2

Please sign in to comment.