]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Perl script in Tramp
authorMichael Albinus <michael.albinus@gmx.de>
Fri, 8 Sep 2023 09:07:54 +0000 (11:07 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Fri, 8 Sep 2023 09:07:54 +0000 (11:07 +0200)
* lisp/net/tramp-sh.el (tramp-perl-file-name-all-completions):
Fix Perl script.  (Bug#65744)

lisp/net/tramp-sh.el

index c00234d43dac6e3006c759a9450a79fc5b613a99..05cd27780cbaf18506d57084ba19184d41a66015 100644 (file)
@@ -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\";