GNU bug report logs - #57572
29.0.50; Tramp error with tramp-file-name-unify

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thievol <at> posteo.net>

Date: Sun, 4 Sep 2022 07:17:01 UTC

Severity: normal

Merged with 57676

Found in version 29.0.50

Fixed in version 29.1

Done: Michael Albinus <michael.albinus <at> gmx.de>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Thierry Volpiatto <thievol <at> posteo.net>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: 57572 <at> debbugs.gnu.org
Subject: bug#57572: 29.0.50; Tramp error with tramp-file-name-unify
Date: Sat, 10 Sep 2022 15:20:20 +0000
[Message part 1 (text/plain, inline)]
Michael Albinus <michael.albinus <at> gmx.de> writes:

>> This because helm connect to tramp as soon the last ":" is entered.
>
> Indeed.
>
>> Debugger entered--Lisp error: (file-error "File `' must be absolute")
>>   signal(file-error ("File `' must be absolute"))
>>   tramp-error((tramp-file-name "sudo" "root" nil "IPad-S340" nil "" nil) file-error "File `%s' must be absolute" "")
>>   tramp-file-name-unify((tramp-file-name "sudo" "root" nil "IPad-S340" nil "" nil) "")
>>   tramp-get-file-property((tramp-file-name "sudo" "root" nil "IPad-S340" nil "" nil) "" "file-readable-p" undef)
>>   tramp-sh-handle-file-readable-p("/sudo:root <at> IPad-S340:")

More exactly, when helm-find-files starts with "/sudo::" and the tramp
connection is not yet enabled, we have:

(file-remote-p "/sudo::" 'localname)
=> ""

and

(helm-ff-set-pattern "/sudo::")
=> #("/sudo:root <at> IPad-S340:" 6 10 (tramp-default t) 11 20 (tramp-default t))

then this value is passed to file-accessible-directory-p and we have the
error.

I tried this and it seems to work without error:

(file-accessible-directory-p
 (if (string= (file-remote-p path 'localname) "")
     ;; First connection
     (concat path "/") ;; path == "/sudo:root <at> IPad-S340:" (see above)
   path)) 

Not sure if it is safe with other methods though, didn't try.

Hope that helps.

Thanks.

-- 
Thierry
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.