mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #2819 from ioito/bugfix/qx-vmware-data-disk-sort
fix: 避免数据盘顺序也被颠倒
This commit is contained in:
@@ -60,7 +60,7 @@ type byDiskType []SVirtualDisk
|
||||
func (d byDiskType) Len() int { return len(d) }
|
||||
func (d byDiskType) Swap(i, j int) { d[i], d[j] = d[j], d[i] }
|
||||
func (d byDiskType) Less(i, j int) bool {
|
||||
if d[i].GetDiskType() == api.DISK_TYPE_SYS || d[j].GetDiskType() == api.DISK_TYPE_DATA {
|
||||
if d[i].GetDiskType() == api.DISK_TYPE_SYS {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user