Bug 334077

Summary: okular fails to open file names with spaces
Product: [Applications] okular Reporter: Sergio Martins <smartins>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: aacid, lueck
Priority: NOR    
Version: 0.19.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Sergio Martins 2014-04-29 13:03:29 UTC
Running this command, on a properly escaped file name:

$ okular pdf\ with\ spaces.pdf

It tries to open 3 files instead

Reproducible: Always
Comment 1 Burkhard Lück 2014-04-29 14:37:48 UTC
$ touch /tmp/pdf\ with\ spaces.pdf
$ okular /tmp/pdf\ with\ spaces.pdf
-> error dialog:
Could not open /tmp/pdf with spaces.pdf
-> Okular recognized only one file, but can't of course open it, because ist is an empty file
Tested with kubuntu 12.04 Qt: 4.8.2 / KDE: 4.12.3 / Okular: 0.18.3
and Qt: 4.8.2 / KDE: 4.13.0 / Okular: 0.19.0  + Qt: 4.8.2 / KDE Development Platform: 4.13.60 / Okular: 0.19.60
Not reproducible here.
Comment 2 Albert Astals Cid 2014-04-29 18:42:33 UTC
Works for me, are you using any other option when calling okular? Can you try stashing away your okular config files okularrc and okularpartrc and see if that makes it work?

Any other special thing you use and we don't that would make it fail for you but work here?
Comment 3 Sergio Martins 2014-04-29 18:45:34 UTC
Found what the problem was.

I had run:
$ s okular /tmp/file\ with\ spaces.pdf

where "s" is:
#!/bin/bash

$@ &> /var/log/s.log &

which removes the slashes...