chmln / handlr

A better xdg-utils
MIT License
609 stars 24 forks source link

Does not fall back to mimetypes if directory name is of the format ___.___ #8

Closed OctarineSourcerer closed 4 years ago

OctarineSourcerer commented 4 years ago

I'd tried opening a path using handlr, it didn't work - the path was /home/dan/.local/share/wesnoth/1.14/. Other paths, such as /home/dan, opened fine, as the inode/directory mimetype is set to use Thunar.

Here's what I did to narrow down the issue - I hope that helps: image

It seems handlr thinks that the path provided is actually the path to a file, and so checks for existing extensions in its list. No matching one is exists, so it errors out, but doesn't check for if it has a mimetype handler.

It would also be worth checking for mimetype handlers before extensions - otherwise, with a directory of /tmp/thing.pdf/, it tries opening it with the handler for .pdf files, even though it's a directory/

chmln commented 4 years ago

Hi @OctarineSourcerer

I've likewise bumped into weird edge-cases but I'm happy to say with v0.4.3 everything should be working properly.

Please give it a shot and let me know if the latest release fixes your issue.

OctarineSourcerer commented 4 years ago

Sorry it took me a couple days to reply! Just tested it, seems to work fine now for all above cases :) Thank you for the quick response!