]> git.eshelyaron.com Git - emacs.git/commitdiff
* net/tramp-sh.el (tramp-sh-handle-file-acl): Delete empty lines
authorMichael Albinus <michael.albinus@gmx.de>
Wed, 19 Dec 2012 13:01:16 +0000 (14:01 +0100)
committerMichael Albinus <michael.albinus@gmx.de>
Wed, 19 Dec 2012 13:01:16 +0000 (14:01 +0100)
and text properties from returned ACL string.
(tramp-sh-handle-set-file-acl): Do not use additional parentheses
for "setfacl" command.

lisp/ChangeLog
lisp/net/tramp-sh.el

index 39fa4b2ef49afd29c7db64cde28efccc943a1028..8e16fe02d9c00cef456c37c25c742fc0477bed9d 100644 (file)
@@ -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
index 788246bffd5df726387eb7f4448b6f808a3b53a0..97270f09327ffda8480e4076b618f9f2d0f7f3d4 100644 (file)
@@ -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.