[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111597: * net/tramp.el (tramp-tramp-
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111597: * net/tramp.el (tramp-tramp-file-p): Check, whether NAME is unibyte. |
Date: |
Thu, 24 Jan 2013 10:50:02 +0100 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111597
committer: Michael Albinus <address@hidden
branch nick: trunk
timestamp: Thu 2013-01-24 10:50:02 +0100
message:
* 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.
modified:
lisp/ChangeLog
lisp/net/tramp-sh.el
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-01-24 03:34:20 +0000
+++ b/lisp/ChangeLog 2013-01-24 09:50:02 +0000
@@ -1,3 +1,11 @@
+2013-01-24 Michael Albinus <address@hidden>
+
+ * 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.
+
2013-01-24 Dmitry Antipov <address@hidden>
* doc-view.el (doc-view-display): Force mode line update until all
=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el 2013-01-21 09:49:43 +0000
+++ b/lisp/net/tramp-sh.el 2013-01-24 09:50:02 +0000
@@ -1549,7 +1549,7 @@
(when (and (tramp-remote-acl-p v)
(tramp-send-command-and-check
v (format
- "getfacl -acs %s 2>/dev/null"
+ "getfacl -ac %s 2>/dev/null"
(tramp-shell-quote-argument localname))))
(with-current-buffer (tramp-get-connection-buffer v)
(goto-char (point-max))
@@ -1560,21 +1560,20 @@
(defun tramp-sh-handle-set-file-acl (filename acl-string)
"Like `set-file-acl' for Tramp files."
- (with-parsed-tramp-file-name filename nil
- (when (tramp-remote-acl-p v)
- (condition-case nil
- (when (stringp acl-string)
- (tramp-set-file-property v localname "file-acl" acl-string)
- (dolist (line (split-string acl-string nil t) t)
- (unless (tramp-send-command-and-check
- v (format
- "setfacl -m %s %s"
- line (tramp-shell-quote-argument localname)))
- (error nil))))
- ;; In case of errors, we return `nil'.
- (error
- (tramp-set-file-property v localname "file-acl" 'undef)
- nil)))))
+ (with-parsed-tramp-file-name (expand-file-name filename) nil
+ (if (and (stringp acl-string) (tramp-remote-acl-p v)
+ (progn
+ (tramp-send-command
+ v (format "setfacl --set-file=- %s <<'EOF'\n%s\nEOF\n"
+ (tramp-shell-quote-argument localname) acl-string))
+ (tramp-send-command-and-check v nil)))
+ ;; Success.
+ (progn
+ (tramp-set-file-property v localname "file-acl" acl-string)
+ t)
+ ;; In case of errors, we return `nil'.
+ (tramp-set-file-property v localname "file-acl-string" 'undef)
+ nil)))
;; Simple functions using the `test' command.
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2013-01-21 09:49:43 +0000
+++ b/lisp/net/tramp.el 2013-01-24 09:50:02 +0000
@@ -1140,9 +1140,12 @@
;;;###tramp-autoload
(defun tramp-tramp-file-p (name)
- "Return t if NAME is a string with Tramp file name syntax."
+ "Return t if NAME is a string with Tramp file name syntax.
+It checks also, whether NAME is unibyte encoded."
(save-match-data
- (and (stringp name) (string-match tramp-file-name-regexp name))))
+ (and (stringp name)
+ (string-equal name (string-as-unibyte name))
+ (string-match tramp-file-name-regexp name))))
(defun tramp-find-method (method user host)
"Return the right method string to use.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111597: * net/tramp.el (tramp-tramp-file-p): Check, whether NAME is unibyte.,
Michael Albinus <=