aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2019-01-08 15:03:57 +0100
committerMichael Albinus2019-01-08 15:03:57 +0100
commit55c5e26307a1e8f1fff74415fc560aa172a421cf (patch)
tree1c77551f0c66d934015816622b53601d3b461746
parent2f947ecafd5135c550b8f69c04d93348eed8f142 (diff)
downloademacs-55c5e26307a1e8f1fff74415fc560aa172a421cf.tar.gz
emacs-55c5e26307a1e8f1fff74415fc560aa172a421cf.zip
Fix nasty cut'n'waste error in Tramp
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-do-copy-or-rename-file): Remove weird code, resulting from cut'n'waste.
-rw-r--r--lisp/net/tramp-sudoedit.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el
index 6ac20121054..cab9b8d835a 100644
--- a/lisp/net/tramp-sudoedit.el
+++ b/lisp/net/tramp-sudoedit.el
@@ -44,8 +44,8 @@
44(tramp--with-startup 44(tramp--with-startup
45 (add-to-list 'tramp-methods 45 (add-to-list 'tramp-methods
46 `(,tramp-sudoedit-method 46 `(,tramp-sudoedit-method
47 (tramp-sudo-login (("sudo") ("-u" "%u") ("-S") ("-H") 47 (tramp-sudo-login (("sudo") ("-u" "%u") ("-S") ("-H")
48 ("-p" "Password:") ("--"))))) 48 ("-p" "Password:") ("--")))))
49 49
50 (add-to-list 'tramp-default-user-alist '("\\`sudoedit\\'" nil "root")) 50 (add-to-list 'tramp-default-user-alist '("\\`sudoedit\\'" nil "root"))
51 51
@@ -299,8 +299,7 @@ absolute file names."
299 (with-parsed-tramp-file-name newname v2 299 (with-parsed-tramp-file-name newname v2
300 (tramp-flush-file-properties 300 (tramp-flush-file-properties
301 v2 (file-name-directory v2-localname)) 301 v2 (file-name-directory v2-localname))
302 (tramp-flush-file-properties v2 v2-localname) 302 (tramp-flush-file-properties v2 v2-localname)))))))
303 (when (tramp-rclone-file-name-p newname))))))))
304 303
305(defun tramp-sudoedit-handle-copy-file 304(defun tramp-sudoedit-handle-copy-file
306 (filename newname &optional ok-if-already-exists keep-date 305 (filename newname &optional ok-if-already-exists keep-date
@@ -453,7 +452,7 @@ the result will be a local, non-Tramp, file name."
453 (delq 452 (delq
454 nil 453 nil
455 (mapcar 454 (mapcar
456 (lambda (l) (and (not (string-match-p "^[[:space:]]*$" l)) l)) 455 (lambda (l) (and (not (string-match-p "^[[:space:]]*$" l)) l))
457 (split-string (buffer-string) "\n" 'omit))))))))) 456 (split-string (buffer-string) "\n" 'omit)))))))))
458 457
459(defun tramp-sudoedit-handle-file-readable-p (filename) 458(defun tramp-sudoedit-handle-file-readable-p (filename)
@@ -675,7 +674,7 @@ component is used as the target of the symlink."
675 (type (and (stringp (nth 2 context)) (nth 2 context))) 674 (type (and (stringp (nth 2 context)) (nth 2 context)))
676 (range (and (stringp (nth 3 context)) (nth 3 context)))) 675 (range (and (stringp (nth 3 context)) (nth 3 context))))
677 (when (tramp-sudoedit-send-command 676 (when (tramp-sudoedit-send-command
678 v "chcon" 677 v "chcon"
679 (when user (format "--user=%s" user)) 678 (when user (format "--user=%s" user))
680 (when role (format "--role=%s" role)) 679 (when role (format "--role=%s" role))
681 (when type (format "--type=%s" type)) 680 (when type (format "--type=%s" type))