From: Michael Albinus Date: Fri, 8 Sep 2023 09:07:54 +0000 (+0200) Subject: Fix Perl script in Tramp X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a90ba8d0156c6e808f481611083b65f2dbf4dc50;p=emacs.git Fix Perl script in Tramp * lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions): Fix Perl script. (Bug#65744) --- diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index c00234d43da..05cd27780cb 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -634,7 +634,10 @@ characters need to be doubled.") (defconst tramp-perl-file-name-all-completions "%p -e ' -($dir = $ARGV[0]) =~ s#/+$##; +$dir = $ARGV[0]; +if ($dir ne \"/\") { + $dir =~ s#/+$##; +} opendir(d, $dir) || die(\"$dir: $!\\nfail\\n\"); @files = readdir(d); closedir(d); print \"(\\n\";