summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2022-04-23 08:50:33 +0200
committerMichael Albinus <michael.albinus@gmx.de>2022-04-23 08:50:33 +0200
commita7dde05cb3a06cc1ec807a2dcbe55f6f11f29b99 (patch)
tree419e3dfbf951b42eccbd2a672f659b67313005ba /lisp
parent43ed7b1e0f182a5f4d82f6542ebf4308d0f78fc5 (diff)
downloademacs-a7dde05cb3a06cc1ec807a2dcbe55f6f11f29b99.tar.gz
emacs-a7dde05cb3a06cc1ec807a2dcbe55f6f11f29b99.tar.bz2
emacs-a7dde05cb3a06cc1ec807a2dcbe55f6f11f29b99.zip
Fix problem with Solaris ls in Tramp
* lisp/net/tramp-sh.el (tramp-sunos-unames): Move up. (tramp-sh--quoting-style-options): Handle erroneous Solaris ls.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-sh.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 54fb539a564..67f5519bbfe 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1189,12 +1189,18 @@ component is used as the target of the symlink."
;; The scripts could fail, for example with huge file size.
(tramp-do-file-attributes-with-ls v localname id-format))))))))
+(defconst tramp-sunos-unames (regexp-opt '("SunOS 5.10" "SunOS 5.11"))
+ "Regexp to determine remote SunOS.")
+
(defun tramp-sh--quoting-style-options (vec)
"Quoting style options to be used for VEC."
(or
(tramp-get-ls-command-with
vec "--quoting-style=literal --show-control-chars")
- (tramp-get-ls-command-with vec "-w")
+ ;; ls on Solaris does not return an error in that case. We've got
+ ;; reports for "SunOS 5.11" so far.
+ (unless (tramp-check-remote-uname vec tramp-sunos-unames)
+ (tramp-get-ls-command-with vec "-w"))
""))
(defun tramp-do-file-attributes-with-ls (vec localname &optional id-format)
@@ -3990,9 +3996,6 @@ Returns the exit code of the `test' program."
switch
(tramp-shell-quote-argument localname)))))
-(defconst tramp-sunos-unames (regexp-opt '("SunOS 5.10" "SunOS 5.11"))
- "Regexp to determine remote SunOS.")
-
(defun tramp-find-executable
(vec progname dirlist &optional ignore-tilde ignore-path)
"Search for PROGNAME in $PATH and all directories mentioned in DIRLIST.