Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sivakumar subraani committed Nov 30, 2023
1 parent ad1d75c commit 9e4bb4a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/controllers/dataexport/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,13 @@ func parseExcludeFileListKey(pvcStorageClass string, excludeFileListValue string
var err error
for _, storageClass := range storageClassList {
equalSignSplit := strings.Split(storageClass, "=")
if len(equalSignSplit) != 2 {
if len(equalSignSplit) <= 1 {
return "", fmt.Errorf("invalid exclude file list in the configmap parameter")
}
// if the PVC storageclass and configure storageclass are same, extract the configured ignore file list
if pvcStorageClass == equalSignSplit[0] {
excludeFileList = equalSignSplit[1]
break
}

}
Expand Down

0 comments on commit 9e4bb4a

Please sign in to comment.