Skip to content

Commit

Permalink
Return false in split method in gateway SP for invalid paths instead …
Browse files Browse the repository at this point in the history
…of panic
  • Loading branch information
ishank011 committed Nov 26, 2020
1 parent be458d8 commit ebc4459
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ func (s *svc) split(ctx context.Context, p string, i int) bool {

// validate that we have always at least two elements
if len(parts) < 2 {
panic(fmt.Sprintf("split: len(parts) < 2: path:%s parts:%+v", p, parts))
return false
}

// validate the share folder is always the second element, first element is always the hardcoded value of "home"
Expand Down

0 comments on commit ebc4459

Please sign in to comment.