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

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

bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using


From: Michael Albinus
Subject: bug#47625: 28.0.50; dired-do-symlink creates invalid symlinks when using Tramp
Date: Thu, 06 May 2021 13:15:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Version: 28.1

Lars Ingebrigtsen <larsi@gnus.org> writes:

Hi,

> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
>> emacs -Q
>> open dired at /sudo::/tmp/
>> M-! touch foo
>> S (dired-do-symlink) on foo, enter /tmp/bar (without tramp prefix) at
>> the prompt
>> g (refresh dired)
>>
>> The result is "bar -> /sudo:root@fgunbin.local:/tmp/foo", which is
>> an invalid symlink.
>
> I can reproduce this bug in Emacs 28, but I haven't tried to debug it.
> Perhaps it's obvious what's going wrong to somebody who knows how Tramp
> works; Michael added to the CCs.

Oops, I've overlooked this when it arrived. Sorry.

Same here, I can reproduce it. Surprisingly, it isn't a Tramp error,
because Tramp isn't involved :-)

The scenario described above results in the call

(make-symbolic-link "/sudo:root@server:/tmp/foo" "/tmp/bar" nil)

Tramp would be involved if either

- LINKNAME is a relative file name, and default-directory is remote, or
- LINKNAME is a remote file name.

LINKNAME is "/tmp/bar", and both conditions do not apply.

"/sudo:root@gandalf:/tmp/foo", the TARGET of the call, must only be a
string. Which syntax it is, or whether it is a valid file name, doesn't
matter.

So I fixed it in dired. If you try to create a symlink between two files
on different hosts, you'll get an error now.

Closing the bug.

Best regards, Michael.





reply via email to

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