mirror of
https://github.com/rclone/rclone.git
synced 2024-12-23 07:29:35 +01:00
ncdu: fallback to sort by name also for sort by average size
This commit is contained in:
parent
d452f502c3
commit
528fc899fb
@ -692,14 +692,18 @@ func (ds *ncduSort) Less(i, j int) bool {
|
||||
return iAvgSize < jAvgSize
|
||||
}
|
||||
// if avgSize is equal, sort by 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
|
||||
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