Skip to content

Conversation

@gierens
Copy link

@gierens gierens commented Aug 11, 2023

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

@ariasuni
Copy link
Collaborator

Would you like re-open that PR but for eza?

@gierens
Copy link
Author

gierens commented Oct 3, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants