• W-Mark Kubacki's avatar
    browse: When sorting by size, offset directories · 239f6825
    W-Mark Kubacki authored
    Assigns negative sizes to directories in order to have them listed reliably
    before any zero-sized files. That order is what most users expect when
    sorting by size.
    
    As side effect directories will appear before files on all filesystem
    implementations. To give an example: before this change directories had a size
    of 4 KiB when using Linux with ext4 or tmpfs, and with ZFS a size resembling
    an estimation of the number of leaves within said directory.
    239f6825
browse.go 10.6 KB