[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: file-relative-name and remote files
From: |
Kai Großjohann |
Subject: |
Re: file-relative-name and remote files |
Date: |
Fri, 07 Mar 2003 21:57:23 +0100 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3.50 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> Hmm, this raises the issue of what expand-file-name should do with
> "/foo:../..". I guess it must leave that unchanged, which means that
> the expand-file-name handler for these file names should be rather
> careful in what it does to simplify whatever part of the name comes
> after. It is not correct to simplify /X/../Y into /Y when /X
> is a remote prefix.
Actually, what Tramp does to expand "/foo:../.." is the following:
* The localname part ("../..") is not absolute, so it must be relative
to the remote home dir. Prepend "~/" to the localname, giving
"/foo:~/../..".
* Expand tildes, giving, say, "/foo:/home/jrl/../..".
* Expand the localname part, giving "/", then tack on the prefix.
The final result is "/foo:/".
Is this the right behavior so far?
In the case of "/address@hidden:../..", where the ~root on the remote host
is "/root", the result will be "/address@hidden:/..", which is not pretty.
Maybe this should be expanded, again, to "/". WDYT?
--
A preposition is not a good thing to end a sentence with.
- Re: file-relative-name and remote files, Kai Großjohann, 2003/03/01
- Re: file-relative-name and remote files, Kai Großjohann, 2003/03/07
- Re: file-relative-name and remote files, Lars Hansen, 2003/03/08
- Re: file-relative-name and remote files, Lars Hansen, 2003/03/08
- Re: file-relative-name and remote files, Lars Hansen, 2003/03/08