martijnvanbrummelen / nwipe

nwipe secure disk eraser
GNU General Public License v2.0
682 stars 77 forks source link

modified disk sorting for more than 26 disks #523

Closed ggruber closed 9 months ago

ggruber commented 9 months ago

so all the single letter disks (sda - sdz) appear before sdaa ...

ggruber commented 9 months ago

@PartialVolume : what do you think about this patch?

PartialVolume commented 9 months ago

Just checking it.

PartialVolume commented 9 months ago

Looks good, puts the longer device names at the end. I don't see any issues, looks fine on my system. Puts nvme0n1 type names at the bottom if I setup some loop device such as loop31 and if I had some /dev/sda devices it would still put them at the bottom.

Screenshot_20231105_160502

PartialVolume commented 9 months ago

@ggruber The device names in the GUI are stripped of their /dev/ prefix if the device name exceeds 8 characters such is the case with /dev/loop31, /dev/nvme0n1 and /dev/sdaa. However that's not an issue, your sort code sorts on the real device name in the context rather than the GUI device name.

Looks fine :-)

PartialVolume commented 9 months ago

Presumably that's what you see on your system.

/dev/sda-/dev/sdz showing as is and sdaa-sdaz showing in the GUI without the /dev/prefix so that column alignment is preserved in the display.