diff options
| author | Michael Albinus | 2009-06-30 11:55:41 +0000 |
|---|---|---|
| committer | Michael Albinus | 2009-06-30 11:55:41 +0000 |
| commit | 4f4126e6a32887ae2f6ebf99e4da038f5cc0b290 (patch) | |
| tree | 7ca10526392039fdff67aff0f752f05079b514c9 | |
| parent | 0ad6626b5fa01472bc16878f50a7616f54250123 (diff) | |
| download | emacs-4f4126e6a32887ae2f6ebf99e4da038f5cc0b290.tar.gz emacs-4f4126e6a32887ae2f6ebf99e4da038f5cc0b290.zip | |
* net/tramp.el (tramp-do-copy-or-rename-file-directly): Handle
also the 'rename case, when setting file modes. (Bug#3712)
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f65bb546be7..037e0981c71 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-06-30 Michael Albinus <michael.albinus@gmx.de> | ||
| 2 | |||
| 3 | * net/tramp.el (tramp-do-copy-or-rename-file-directly): Handle | ||
| 4 | also the 'rename case, when setting file modes. (Bug#3712) | ||
| 5 | |||
| 1 | 2009-06-30 Kenichi Handa <handa@m17n.org> | 6 | 2009-06-30 Kenichi Handa <handa@m17n.org> |
| 2 | 7 | ||
| 3 | * international/fontset.el (setup-default-fontset): Add CJK fonts | 8 | * international/fontset.el (setup-default-fontset): Add CJK fonts |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index be41858a7b1..9da9e314cd2 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -3225,7 +3225,9 @@ KEEP-DATE means to make sure that NEWNAME has the same timestamp | |||
| 3225 | as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep | 3225 | as FILENAME. PRESERVE-UID-GID, when non-nil, instructs to keep |
| 3226 | the uid and gid from FILENAME." | 3226 | the uid and gid from FILENAME." |
| 3227 | (let ((t1 (tramp-tramp-file-p filename)) | 3227 | (let ((t1 (tramp-tramp-file-p filename)) |
| 3228 | (t2 (tramp-tramp-file-p newname))) | 3228 | (t2 (tramp-tramp-file-p newname)) |
| 3229 | (file-times (nth 5 (file-attributes filename))) | ||
| 3230 | (file-modes (tramp-default-file-modes filename))) | ||
| 3229 | (with-parsed-tramp-file-name (if t1 filename newname) nil | 3231 | (with-parsed-tramp-file-name (if t1 filename newname) nil |
| 3230 | (let* ((cmd (cond ((and (eq op 'copy) preserve-uid-gid) "cp -f -p") | 3232 | (let* ((cmd (cond ((and (eq op 'copy) preserve-uid-gid) "cp -f -p") |
| 3231 | ((eq op 'copy) "cp -f") | 3233 | ((eq op 'copy) "cp -f") |
| @@ -3364,8 +3366,8 @@ the uid and gid from FILENAME." | |||
| 3364 | ;; Set the time and mode. Mask possible errors. | 3366 | ;; Set the time and mode. Mask possible errors. |
| 3365 | (condition-case nil | 3367 | (condition-case nil |
| 3366 | (when keep-date | 3368 | (when keep-date |
| 3367 | (set-file-times newname (nth 5 (file-attributes filename))) | 3369 | (set-file-times newname file-times) |
| 3368 | (set-file-modes newname (tramp-default-file-modes filename))) | 3370 | (set-file-modes newname file-modes)) |
| 3369 | (error))))) | 3371 | (error))))) |
| 3370 | 3372 | ||
| 3371 | (defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date) | 3373 | (defun tramp-do-copy-or-rename-file-out-of-band (op filename newname keep-date) |