chmln / handlr

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

Opening url encoded file paths #31

Open bloody-scythe opened 3 years ago

bloody-scythe commented 3 years ago

So... Handlr seems to pass uri file paths directly to the program (differently from xdg-open) which some programs are not ready to handle. That make the file not to be found.

example: file://home/user/file.png isn't parsed to /home/user/file.png

chmln commented 3 years ago

@bloody-scythe thanks for reporting this, will look into it

hukacode commented 3 years ago

Hi @chmln

I got a similar error look like the one in this link. (https://bbs.archlinux.org/viewtopic.php?id=207758) I think it is the same issue as @bloody-scythe's issue then I mention it instead of creating a new issue.

Thank you so much for your attention, time and efforts.

chmln commented 3 years ago

@bloody-scythe @hukacode should be fixed in the latest release :) Please reopen this if it still doesn't work.

hukacode commented 3 years ago

Hi @chmln

I still get this issue with version 0.6.1 I open pdf file from Calibre (screenshots in below). I can open with another extension (epub) so I don't know if it is handlr issue or pdf issue.

Best regards, Huka

image image

chmln commented 3 years ago

@hukacode It was definitely a handlr issue. I just published a fix so it should work in v0.6.3 now

hukacode commented 3 years ago

Hi @chmln

This is an error when I open with v0.6.3 image

In previous version, I can open "location" with file manager, but now I get this error image

This is the file path image

chmln commented 3 years ago

Ahhhh I see what's happening. The path gets urlencoded. When I was testing the fix locally I didn't think to check a file with spaces. Now I just have olto urldecode the path before passing it to the program.

Thanks @hukacode !