Open tmfelwu opened 2 years ago
Turns out it is because we are using the path
instead of the uri
when the resource starts with file://
. Switching to shell.openExternal()
and passing the uri instead of the path at this place works fine (atleast on linux).
If you check the history of this file you'll see we switched between openExternal and openPath many times. Basically every time someone has an issue like yours they create a PR to switch the call, which makes one case works and break other cases. Supporting the hash symbol is low priority although if you manage to fix it without changing the function call we could consider it.
@laurent22 just to confirm do you mean without changing shell.openPath
to shell.openExternal
?
@laurent22 just to confirm do you mean without changing
shell.openPath
toshell.openExternal
?
I think he meant about the URL utilities function calls.
@laurent22 just to confirm do you mean without changing
shell.openPath
toshell.openExternal
?
yes
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.
Still an issue. See https://discourse.joplinapp.org/t/linking-anomaly/37506/2
Description
I am trying to open a pdf to a certain page via link to local files. Say I have a pdf at
/home/abc/file.pdf
In markdown this works fine as it should.
However, when I try to specify the page number
Nothing happens. On seeing the
journalctl
logs I see this error.I have tried to URL encode the path, like so
but this still doesnt work.
Shouldn't it (i think electron handles this) just check for the existence of
file://home/abc/file.pdf
instead offile://home/abc/file.pdf#page=4
Environment
Joplin version: 2.7.12 Platform: Linux OS specifics: Ubuntu 18.04
Steps to reproduce
Describe what you expected to happen
The pdf should open at the correct page number.
Logfile
No error messages.
Diagnosis
I think these lines might be the reason.
Is there a reason we are using
openPath
for files instead ofopenExternal
whose argument is URL.