Bug#369812: libgnomevfs2-0: Fails to handle %% escape correctly in .desktop files

Matijs van Zuijlen Matijs.van.Zuijlen at xs4all.nl
Tue Jun 6 10:31:46 UTC 2006


On Tue, Jun 06, 2006 at 11:13:40AM +0200, Josselin Mouette wrote:
> I'm afraid I can't reproduce that.
> 
> Using "Exec=touch /tmp/pouet_%%" I've seen the file /tmp/pouet_% is
> correctly created.

I see. I just checked, and that one also works fine here.

> Do you have any hints to reproduce the bug?

The problem occurs with the desktop files nautilus uses to open files. In
particular, what I want is to open text files using

  gvim -c "cd %:h" <file>

What I do is this:

  - Right click on a text file.
  - Select "Open with other application".
  - In the resulting dialog, select "Use a custom command".
  - Type

    gvim -c "cd %%:h" %f

  - Click "Open"
  - Gvim appears, with the error message:

    Error detected while processing command line:
    E344: Can't find directory ":h" in cdpath
    E472: Command failed

Typing

  gvim -c "cd %:h" whatever.txt

on the command line works fine.

(AFAICS, the handling of mime types is done in
libgnomevfs/gnome-vfs-mime-handlers.c, in the function expand_macro,
starting at line 1449. Inspecting the code shows that %% is ignored there,
instead of converted to %)

-- 
Matijs van Zuijlen					http://www.matijs.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-gnome-maintainers/attachments/20060606/b74db1cd/attachment.pgp


More information about the Pkg-gnome-maintainers mailing list