bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28264: Accessing source directory through symlink produces false war


From: Michael Albinus
Subject: bug#28264: Accessing source directory through symlink produces false warnings
Date: Wed, 30 Aug 2017 10:37:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Paul Eggert <eggert@cs.ucla.edu> writes:

Hi Paul,

> The problem I was thinking of does not seem to be covered by Tramp
> tests. If, for example, I do these shell commands:
>
> $ ln -s "../penguin:motd" /tmp/foo
> $ ls -l /tmp/foo
> lrwxrwxrwx 1 eggert eggert 15 Aug 29 19:00 /tmp/foo -> ../penguin:motd
>
> then (file-truename "/tmp/foo") returns "/penguin:motd" which is not
> /tmp/foo's true name as far as Emacs file-oriented commands are
> concerned.

It is. "/penguin:motd" is not a remote file name by default (it would be
only with Tramp's simplified syntax). But this is rather academical;
"/penguin:motd:" would be a remote file name. So let's continue with
this example.

I've changed the link:

# ls -l /tmp/foo
lrwxrwxrwx 1 albinus albinus 16 Aug 30 10:10 /tmp/foo -> ../penguin:motd:

The problem in returning a remote file name still exists, maybe you
could check your change, again? (file-truename "/tmp/foo") goes remote
to "/penguin:motd:".

For Tramp, we have

(file-truename "/ssh::/tmp/foo") => "/ssh:hostname:/penguin:motd:"

This is not wrong, but I'd prefer to get its quoted variant
"/ssh:hostname:/:/penguin:motd:". Will work on this.

And I'll add your test to tramp-tests.el.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]