mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 12:05:05 +08:00
ncdu: fallback to sort by name also for sort by average size
This commit is contained in:
parent
d452f502c3
commit
528fc899fb
|
@ -692,13 +692,17 @@ func (ds *ncduSort) Less(i, j int) bool {
|
|||
return iAvgSize < jAvgSize
|
||||
}
|
||||
// if avgSize is equal, sort by size
|
||||
return iattrs.Size < jattrs.Size
|
||||
if iattrs.Size != jattrs.Size {
|
||||
return iattrs.Size < jattrs.Size
|
||||
}
|
||||
case ds.u.sortByAverageSize > 0:
|
||||
if iAvgSize != jAvgSize {
|
||||
return iAvgSize > jAvgSize
|
||||
}
|
||||
// if avgSize is equal, sort by size
|
||||
return iattrs.Size > jattrs.Size
|
||||
if iattrs.Size != jattrs.Size {
|
||||
return iattrs.Size > jattrs.Size
|
||||
}
|
||||
}
|
||||
// if everything equal, sort by name
|
||||
return iname < jname
|
||||
|
|
Loading…
Reference in New Issue
Block a user