emacs-diffs
[Top][All Lists]
Advanced

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

master 19513a654e6: ; Fix last change


From: Michael Albinus
Subject: master 19513a654e6: ; Fix last change
Date: Wed, 16 Aug 2023 13:31:16 -0400 (EDT)

branch: master
commit 19513a654e6cec0b8813c90a3f8216bb5e441baa
Author: Michael Albinus <michael.albinus@gmx.de>
Commit: Michael Albinus <michael.albinus@gmx.de>

    ; Fix last change
    
    * lisp/net/tramp-sh.el (tramp-bundle-read-file-names): Replace "echo -n"
    by "printf", it isn't portable.  (Bug#65321)
---
 lisp/net/tramp-sh.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 4e6ba6e38d7..0599f89655c 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1077,10 +1077,10 @@ characters need to be doubled.")
   "echo \"(\"
 while read file; do
     quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"`
-    echo -n \"(\\\"$quoted\\\"\"
-    if %s \"$file\"; then echo -n \" t\"; else echo -n \" nil\"; fi
-    if %s \"$file\"; then echo -n \" t\"; else echo -n \" nil\"; fi
-    if %s \"$file\"; then echo \" t)\"; else echo \" nil)\"; fi
+    printf \"(%%b\" \"\\\"$quoted\\\"\"
+    if %s \"$file\"; then printf \" %%b\" t; else printf \" %%b\" nil; fi
+    if %s \"$file\"; then printf \" %%b\" t; else printf \" %%b\" nil; fi
+    if %s \"$file\"; then printf \" %%b)\n\" t; else printf \" %%b)\n\" nil; fi
 done
 echo \")\""
   "Script to check file attributes of a bundle of files.
@@ -1088,7 +1088,8 @@ It must be sent formatted with three strings; the tests 
for file
 existence, file readability, and file directory.  Input shall be
 read via here-document, otherwise the command could exceed
 maximum length of command line.
-Format specifiers \"%s\" are replaced before the script is used.")
+Format specifiers \"%s\" are replaced before the script is used,
+percent characters need to be doubled.")
 
 ;; New handlers should be added here.
 ;;;###tramp-autoload



reply via email to

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