summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2012-12-19 14:01:16 +0100
committerMichael Albinus <michael.albinus@gmx.de>2012-12-19 14:01:16 +0100
commit3c532af61710e373a311bce5ed7fbd8cacd5dd7d (patch)
treeb9b789c2a3211c76ab9213cde31a74c6f063a64c
parent474d441e121b783a81e226042518b1c68e90fc2a (diff)
downloademacs-3c532af61710e373a311bce5ed7fbd8cacd5dd7d.tar.gz
* 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.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp-sh.el11
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 <michael.albinus@gmx.de>
+
+ * 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 <michael.albinus@gmx.de>
* 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.