leading '/' prevents from handling remote files via ssh
Status: Beta
Brought to you by:
gyll
gedit can handle remote file via ssh connection. These files can be registered to a project but after reopening this project, a leading '/' to the path of this remote file prevents it to be opened again. This file will the be removed from project with the following message:
Project opened: 'GRID.gedit-project'
- The following file has NOT BEEN FOUND; it has been REMOVED from the project: '/ssh://user@site.tld/home/user/GRID/scripts/_gridjobsubmit'
The leading '/' seems to be the cause of this failure.
Logged In: YES
user_id=1621286
Originator: NO
oki, 10x, i'll look into it (after the new year's :-)
Logged In: YES
user_id=1621286
Originator: NO
actually i think i'm doning a strip of 'file://' from the uri (which in the case of ssh:// obviously doesn't work and everything blows up)
Logged In: NO
Quick fix is to change the second line in _open_files so that it considers either a valid local file path, or a uri starting with 'ssh:' to be valid:
if ( os.path.exists( file_uri.lstrip( "file:" ).replace("%20", " ") ) or
( file_uri.lstrip().find("ssh:") == 0) ):