diff options
| author | Michael Albinus | 2013-01-24 10:50:02 +0100 |
|---|---|---|
| committer | Michael Albinus | 2013-01-24 10:50:02 +0100 |
| commit | e1ffa412b4ebd244c834854098031756743236e0 (patch) | |
| tree | f9e65045f261cd2881c153f3c167be9d24742922 | |
| parent | 7ff2b2a628fe6d6eb99038fb1e7d8cd086257742 (diff) | |
| download | emacs-e1ffa412b4ebd244c834854098031756743236e0.tar.gz emacs-e1ffa412b4ebd244c834854098031756743236e0.zip | |
* net/tramp.el (tramp-tramp-file-p): Check, whether NAME is unibyte.
* net/tramp-sh.el (tramp-sh-handle-set-file-acl): Do not suppress
basic attributes.
(tramp-sh-handle-set-file-acl): Improve error checking.
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 31 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 7 |
3 files changed, 28 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index afab39e6efc..9c4f8f37a9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-01-24 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-tramp-file-p): Check, whether NAME is unibyte. | ||
| 4 | |||
| 5 | * net/tramp-sh.el (tramp-sh-handle-set-file-acl): Do not suppress | ||
| 6 | basic attributes. | ||
| 7 | (tramp-sh-handle-set-file-acl): Improve error checking. | ||
| 8 | |||
| 1 | 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru> | 9 | 2013-01-24 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 10 | ||
| 3 | * doc-view.el (doc-view-display): Force mode line update until all | 11 | * doc-view.el (doc-view-display): Force mode line update until all |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 743c8dbe0f9..21c747967af 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -1549,7 +1549,7 @@ be non-negative integers." | |||
| 1549 | (when (and (tramp-remote-acl-p v) | 1549 | (when (and (tramp-remote-acl-p v) |
| 1550 | (tramp-send-command-and-check | 1550 | (tramp-send-command-and-check |
| 1551 | v (format | 1551 | v (format |
| 1552 | "getfacl -acs %s 2>/dev/null" | 1552 | "getfacl -ac %s 2>/dev/null" |
| 1553 | (tramp-shell-quote-argument localname)))) | 1553 | (tramp-shell-quote-argument localname)))) |
| 1554 | (with-current-buffer (tramp-get-connection-buffer v) | 1554 | (with-current-buffer (tramp-get-connection-buffer v) |
| 1555 | (goto-char (point-max)) | 1555 | (goto-char (point-max)) |
| @@ -1560,21 +1560,20 @@ be non-negative integers." | |||
| 1560 | 1560 | ||
| 1561 | (defun tramp-sh-handle-set-file-acl (filename acl-string) | 1561 | (defun tramp-sh-handle-set-file-acl (filename acl-string) |
| 1562 | "Like `set-file-acl' for Tramp files." | 1562 | "Like `set-file-acl' for Tramp files." |
| 1563 | (with-parsed-tramp-file-name filename nil | 1563 | (with-parsed-tramp-file-name (expand-file-name filename) nil |
| 1564 | (when (tramp-remote-acl-p v) | 1564 | (if (and (stringp acl-string) (tramp-remote-acl-p v) |
| 1565 | (condition-case nil | 1565 | (progn |
| 1566 | (when (stringp acl-string) | 1566 | (tramp-send-command |
| 1567 | (tramp-set-file-property v localname "file-acl" acl-string) | 1567 | v (format "setfacl --set-file=- %s <<'EOF'\n%s\nEOF\n" |
| 1568 | (dolist (line (split-string acl-string nil t) t) | 1568 | (tramp-shell-quote-argument localname) acl-string)) |
| 1569 | (unless (tramp-send-command-and-check | 1569 | (tramp-send-command-and-check v nil))) |
| 1570 | v (format | 1570 | ;; Success. |
| 1571 | "setfacl -m %s %s" | 1571 | (progn |
| 1572 | line (tramp-shell-quote-argument localname))) | 1572 | (tramp-set-file-property v localname "file-acl" acl-string) |
| 1573 | (error nil)))) | 1573 | t) |
| 1574 | ;; In case of errors, we return `nil'. | 1574 | ;; In case of errors, we return `nil'. |
| 1575 | (error | 1575 | (tramp-set-file-property v localname "file-acl-string" 'undef) |
| 1576 | (tramp-set-file-property v localname "file-acl" 'undef) | 1576 | nil))) |
| 1577 | nil))))) | ||
| 1578 | 1577 | ||
| 1579 | ;; Simple functions using the `test' command. | 1578 | ;; Simple functions using the `test' command. |
| 1580 | 1579 | ||
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 69e82de3f7f..045304cbc4f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1140,9 +1140,12 @@ If the `tramp-methods' entry does not exist, return nil." | |||
| 1140 | 1140 | ||
| 1141 | ;;;###tramp-autoload | 1141 | ;;;###tramp-autoload |
| 1142 | (defun tramp-tramp-file-p (name) | 1142 | (defun tramp-tramp-file-p (name) |
| 1143 | "Return t if NAME is a string with Tramp file name syntax." | 1143 | "Return t if NAME is a string with Tramp file name syntax. |
| 1144 | It checks also, whether NAME is unibyte encoded." | ||
| 1144 | (save-match-data | 1145 | (save-match-data |
| 1145 | (and (stringp name) (string-match tramp-file-name-regexp name)))) | 1146 | (and (stringp name) |
| 1147 | (string-equal name (string-as-unibyte name)) | ||
| 1148 | (string-match tramp-file-name-regexp name)))) | ||
| 1146 | 1149 | ||
| 1147 | (defun tramp-find-method (method user host) | 1150 | (defun tramp-find-method (method user host) |
| 1148 | "Return the right method string to use. | 1151 | "Return the right method string to use. |