NikitaIvanovV / ctpv

Image previews for lf file manager
https://www.nikitaivanov.com/man1/ctpv
MIT License
272 stars 26 forks source link

Can't handle files with multiple . in their name #48

Open ghost opened 1 year ago

ghost commented 1 year ago

Preview doesn't work with files that have multiple dots in the file name. If I have a file with the name archlinux.ios.torrent the preview will not work but if I rename the same file to archlinux.torrent the preview works fine.

NikitaIvanovV commented 1 year ago

I've just committed 83af722, should be fixed now. I did not fix it for all the extensions though, only .torrent.

ghost commented 1 year ago

thanks but I think the same issues occur with all other file types not just torrents. if you could fix it for all other file types that would be great

Joyje commented 1 week ago

Any updates on this? I am having issues with previewing archives with version numbers in them because of this exact issue.

For example: ctpv-1.1.tar.gz is considered "binary", while if I remove one dot and make it ctpv-11.tar.gz the preview works as intended.