GNOME Bugzilla – Bug 766531
evince-previewer cannot open from URI
Last modified: 2016-05-24 11:52:43 UTC
Created attachment 328007 [details] ./test-uri file:///path/to/file.pdf Backstory here: http://entrenchant.blogspot.com/2016/03/xdg-open-arcanery.html https://bugzilla.redhat.com/show_bug.cgi?id=1329804 https://phab.enlightenment.org/T3555 At a minimum, evince-previewer should be fixed to not choke on a URI argv[0]. The problem is here (line 197) in previewer/ev-previewer.c: if (!g_file_test (argv[1], G_FILE_TEST_IS_REGULAR)) { g_printerr ("Filename \"%s\" does not exist or is not a regular file\n", argv[1]); return 1; } g_file_test returns failure when being passed a raw URI. I've attached simple test code which illustrates this fact. I tried quite a few different things to fix this, but none of them worked. :/
Created attachment 328380 [details] [review] previewer: handle opening files from URI
Comment on attachment 328380 [details] [review] previewer: handle opening files from URI Thanks
Attachment 328380 [details] pushed as 71767db - previewer: handle opening files from URI