From 3c532af61710e373a311bce5ed7fbd8cacd5dd7d Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 19 Dec 2012 14:01:16 +0100 Subject: [PATCH] * net/tramp-sh.el (tramp-sh-handle-file-acl): Delete empty lines and text properties from returned ACL string. (tramp-sh-handle-set-file-acl): Do not use additional parentheses for "setfacl" command. --- lisp/ChangeLog | 7 +++++++ lisp/net/tramp-sh.el | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 39fa4b2ef49..8e16fe02d9c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2012-12-19 Michael Albinus + + * net/tramp-sh.el (tramp-sh-handle-file-acl): Delete empty lines + and text properties from returned ACL string. + (tramp-sh-handle-set-file-acl): Do not use additional parentheses + for "setfacl" command. + 2012-12-18 Michael Albinus * net/tramp.el (tramp-error-with-buffer): Give a hint to use diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 788246bffd5..97270f09327 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -1549,7 +1549,9 @@ and gid of the corresponding user is taken. Both parameters must be integers." "getfacl -ac %s 2>/dev/null" (tramp-shell-quote-argument localname)))) (with-current-buffer (tramp-get-connection-buffer v) - (buffer-string)))))) + (goto-char (point-max)) + (delete-blank-lines) + (substring-no-properties (buffer-string))))))) (defun tramp-sh-handle-set-file-acl (filename acl-string) "Like `set-file-acl' for Tramp files." @@ -1557,11 +1559,8 @@ and gid of the corresponding user is taken. Both parameters must be integers." (if (and (stringp acl-string) (tramp-remote-acl-p v) (tramp-send-command-and-check - v - (format "setfacl --set-file=- %s <<'EOF'\n%s\nEOF\n" - (tramp-shell-quote-argument localname) - acl-string) - t)) + v (format "setfacl --set-file=- %s <<'EOF'\n%s\nEOF\n" + (tramp-shell-quote-argument localname) acl-string))) (tramp-set-file-property v localname "file-acl" acl-string) (tramp-set-file-property v localname "file-acl-string" 'undef))) ;; We always return nil. -- 2.39.5