Nautilus Passes Relative Path to vim for Remote Files

Bug #46209 reported by Rick Gabriel
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: nautilus

When opening a file through nautilus with gvim (via gnome-vfs sftp), the remote file path within the command issued to vim does not contain a leading slash as would be used for an absolute path. vim attempts to connect to the remote system properly but gives an error that the remote file doesn't exist since the path is incomplete.

I'm not sure if this is a problem with nautilus, vim, and/or gnome-vfs so please change the related package if I'm wrong.

Revision history for this message
Rick Gabriel (klaxian1) wrote :

I am using the following related package versions:

nautilus 2.14.1-0ubuntu9
vim 1:6.4-006+2ubuntu6
libgnomevfs2-0 2.14.1-0ubuntu8

Revision history for this message
Sebastien Bacher (seb128) wrote :

what do you mean by "vim does not contain a leading slash as would be used for an absolute path"?

Changed in nautilus:
assignee: nobody → desktop-bugs
status: Unconfirmed → Needs Info
Revision history for this message
Rick Gabriel (klaxian1) wrote :

Well, the command passed to vim and the output is as follows:

:!sftp <email address hidden>:home/USER/FILE.txt /tmp/v129667/1
Connecting to SERVER...
Couldn't stat remote file: No such file or directory

I have replaced any personal information with all-caps tags. As you can see, "home" should be "/home". If I change the path to that and try it manually, it at least finds and downloads the file. vim still does not actually open the file; it simply downloads it. I'm not sure if that is a separate problem with vim or the parameters it's getting from nautilus, gnome-vfs, or another package. Please let me know if you need any more information. Thanks for looking into it.

Revision history for this message
Sebastien Bacher (seb128) wrote :

According to a "ps ax", the command called "gvim -f sftp://IP/path", if gvim doesn't interpret it correctly that's a gvim issue. Running "gvim -f sftp://IP/path" from the command line has the same behaviour, reassigning

Changed in nautilus:
assignee: desktop-bugs → nobody
status: Needs Info → Unconfirmed
Revision history for this message
Rick Gabriel (klaxian1) wrote :

I tested this and I think that in your syntax above, "path" refers to the absolute path with leading slashes. When I substitute an absolute path including the leading slash for the word "path" in your above command line example, it works correctly and opens the remote file.

Working command line example:
gvim -f sftp://SERVER//home/USER/FILE.txt

In this case, "path" is "/home/USER/FILE.txt". That being said, does this still indicate a vim bug?

Revision history for this message
Sebastien Bacher (seb128) wrote :

I would say that's still a vim bug, the URI syntax could be parsed correctly by it

Revision history for this message
Constantine Evans (cevans) wrote :

Confirming this. This is still happening in Edgy.

Changed in vim:
status: Unconfirmed → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.