[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp/net tramp.el [EMACS_23_1_RC]
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] emacs/lisp/net tramp.el [EMACS_23_1_RC] |
Date: |
Tue, 30 Jun 2009 12:09:27 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Branch: EMACS_23_1_RC
Changes by: Michael Albinus <albinus> 09/06/30 12:09:27
Modified files:
lisp/net : tramp.el
Log message:
* net/tramp.el (tramp-do-copy-or-rename-file-directly): Handle
also the 'rename case, when setting file modes. (Bug#3712)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/net/tramp.el?cvsroot=emacs&only_with_tag=EMACS_23_1_RC&r1=1.236.2.1&r2=1.236.2.2
Patches:
Index: tramp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/net/tramp.el,v
retrieving revision 1.236.2.1
retrieving revision 1.236.2.2
diff -u -b -r1.236.2.1 -r1.236.2.2
--- tramp.el 29 Jun 2009 21:05:05 -0000 1.236.2.1
+++ tramp.el 30 Jun 2009 12:09:26 -0000 1.236.2.2
@@ -3199,7 +3199,9 @@
as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep
the uid and gid from FILENAME."
(let ((t1 (tramp-tramp-file-p filename))
- (t2 (tramp-tramp-file-p newname)))
+ (t2 (tramp-tramp-file-p newname))
+ (file-times (nth 5 (file-attributes filename)))
+ (file-modes (tramp-default-file-modes filename)))
(with-parsed-tramp-file-name (if t1 filename newname) nil
(let* ((cmd (cond ((and (eq op 'copy) preserve-uid-gid) "cp -f -p")
((eq op 'copy) "cp -f")
@@ -3338,8 +3340,8 @@
;; Set the time and mode. Mask possible errors.
(condition-case nil
(when keep-date
- (set-file-times newname (nth 5 (file-attributes filename)))
- (set-file-modes newname (tramp-default-file-modes filename)))
+ (set-file-times newname file-times)
+ (set-file-modes newname file-modes))
(error)))))
(defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date)