dat-fox icon indicating copy to clipboard operation
dat-fox copied to clipboard

"View local files" does not correctly link to files on disk

Open bgcarlisle opened this issue 6 years ago • 2 comments

When I click the "View local files" button on a dat archive, it tries to send me here:

moz-extension://8b706831-cd2b-4f70-adb2-0ba06120c502/home/[my user name]/.local/datfox/library/[name of archive]

And in the browser I get the following message:

File not found

Firefox can’t find the file at moz-extension://8b706831-cd2b-4f70-adb2-0ba06120c502/home/[my user name]/.local/datfox/library/[name of archive]

Check the file name for capitalization or other typing errors.
Check to see if the file was moved, renamed or deleted.

If I navigate to /home/[my user name]/.local/datfox/library/[name of archive] in my filesystem, I can find the files okay, but the actual link seems to be broken.

Thanks for your work on this!

bgcarlisle avatar Jul 05 '18 17:07 bgcarlisle

Thanks for reporting. Looks like we just need to add the file:/// protocol to the url we generate here. I'll add it to the todo.

sammacbeth avatar Jul 18 '18 09:07 sammacbeth

I looked into this and it seems that extensions are not permitted to open tabs with file:/// urls. The current version just works on windows thanks to the way it interprets the file path being put into the url bar, but does not work on Mac and Linux. I'll have to try to find an alternative way to make this work cross platform.

sammacbeth avatar Aug 14 '18 07:08 sammacbeth