You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently noticed a weird inconsistency when trying to open PDF files as new window with --new-window argument and also supplying the relative path to Sioyek. The problem was that it failed to recognize that relative path correctly.
I identified the reason and I am not completely sure if its a bug or it is on purpose. Here is how you can reproduce it
Lets imagine a scenario where I open a.pdf in directory /files/ as the initial file with the command sioyek --new-window a.pdf (while I am inside /files/) that launches Sioyek.
Then I also want to open b.pdf as another window but it is in directory /files/dir/ to which I previously navigate, so I run sioyek --new-window b.pdf (while being in /files/dir/)
The initial instance of sioyek will be supplied with this new path to file, however it will fail to open it because it is appending the relative path (being ./b.pdf) to the current working directory of the initial instance (being /files/), not the new temporary instance CWD, so it tries to open /files/b.pdf and fails.
The fact that I am still able to open PDF files inside of CWD of initial instance as new window confirms this theory (e.g. I can open c.pdf inside /files/ because it does not trigger the bug).
There is no issue when Sioyek is supplied with the full path to b.pdf, so it is not that critical, however I believe relative paths should still be handled correctly and that's why I report this issue.
The text was updated successfully, but these errors were encountered:
I recently noticed a weird inconsistency when trying to open PDF files as new window with
--new-window
argument and also supplying the relative path to Sioyek. The problem was that it failed to recognize that relative path correctly.I identified the reason and I am not completely sure if its a bug or it is on purpose. Here is how you can reproduce it
a.pdf
in directory/files/
as the initial file with the commandsioyek --new-window a.pdf
(while I am inside/files/
) that launches Sioyek.b.pdf
as another window but it is in directory/files/dir/
to which I previously navigate, so I runsioyek --new-window b.pdf
(while being in/files/dir/
)The initial instance of sioyek will be supplied with this new path to file, however it will fail to open it because it is appending the relative path (being
./b.pdf
) to the current working directory of the initial instance (being/files/
), not the new temporary instance CWD, so it tries to open/files/b.pdf
and fails.The fact that I am still able to open PDF files inside of CWD of initial instance as new window confirms this theory (e.g. I can open
c.pdf
inside/files/
because it does not trigger the bug).There is no issue when Sioyek is supplied with the full path to
b.pdf
, so it is not that critical, however I believe relative paths should still be handled correctly and that's why I report this issue.The text was updated successfully, but these errors were encountered: