Bug 334510 - Opening a second file from shell with a relative folder name when tabs are used fails
Summary: Opening a second file from shell with a relative folder name when tabs are us...
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.19.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-08 10:12 UTC by Albert Astals Cid
Modified: 2014-08-03 00:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.14.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2014-05-08 10:12:19 UTC
How to reproduce this:
 * Have tabs enabled
 * Be in directory "a"
 * Run "okular somefile.pdf"
 * Go to directory "b"
 * Run "okular someotherfile.pdf"
 * Opening of this second file will fail
Comment 1 Willem 2014-06-15 08:06:00 UTC
This is also a problem when viewing LaTeX output using Kile, since it uses relative paths.

I think this goes wrong in root/shell/main.cpp:108:

// Returns false if it can't fit another document
const QDBusReply<bool> reply = bestService->call( "openDocument", arg );

Here the (relative) file name is given as an argument to the running instance of Okular, that has another working directory. I guess that the file name has to be made absolute before calling openDocument.
Comment 2 Albert Astals Cid 2014-07-30 22:18:29 UTC
Jonathan any chance we can get a fix for this for 4.14.0 (tagging in one week)?
Comment 3 Jonathan Doman 2014-07-31 04:53:10 UTC
Thanks for the tip, Willem. The patch is posted.
Comment 4 Albert Astals Cid 2014-08-03 00:06:39 UTC
Git commit 50f2019f8b7112103a1c9191437c81720bd3926a by Albert Astals Cid.
Committed on 03/08/2014 at 00:04.
Pushed by aacid into branch 'KDE/4.14'.

Pass absolute urls

Patch pased on patch by Jonathan Doman based in a suggstion of willemsonke@planet.nl
REVIEW: 119550
FIXED-IN: 4.14.0

M  +4    -0    shell/main.cpp

http://commits.kde.org/okular/50f2019f8b7112103a1c9191437c81720bd3926a