Skip to content

Commit

Permalink
Fix Panic with empty source zone (#5235)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdmanv authored and Ilya Kislenko committed Mar 20, 2019
1 parent c40235b commit f9cefae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/blockstorage/zone/zone.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ func consistentZone(sourceZone string, nzs map[string]struct{}) (string, error)
}

func getZoneSuffixesMatch(zone1, zone2 string) bool {
if zone1 == "" || zone2 == "" {
return zone1 == zone2
}
a1 := zone1[len(zone1)-1]
a2 := zone2[len(zone2)-1]
return a1 == a2
Expand Down

0 comments on commit f9cefae

Please sign in to comment.