Open gierens opened 1 year ago
Would you like re-open that PR but for eza?
Ah, yeah right ... I'll probably do that ... but I'll have to think about it for a bit because this is just one tiny special case of so many. And actually when I wrote this PR I was already considering whether there is a way to handle multipart extensions in a general fashion.
Revise File::ext to extract "so" extension from versioned shared libraries, so instead of returning "3" for "libtest.so.1.2.3" it returns "so".
The parsing only kicks in when the last extension is a numeric value, and then keeps on going back through the numbers until it finds the "so" or not. Only checking for numbers after the "so" should be sufficient for nearly all libs. I only found two exceptions in my
/usr/lib
, some.so.owner
and a.so.sign
. Trying to match those would require a much more general approach which doesn't seem to be worth it here.Resolves #1105