[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99546: * net/tramp.el (tramp-do-copy
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99546: * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect |
Date: |
Mon, 22 Feb 2010 14:48:52 +0100 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99546
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Mon 2010-02-22 14:48:52 +0100
message:
* net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect
setting the modes by `ignore-errors'. It might fail, for example
if the file is not owned by the user but the group.
(tramp-handle-write-region): Ensure, that `tmpfile' is always readable.
modified:
lisp/ChangeLog
lisp/net/tramp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-02-21 21:12:46 +0000
+++ b/lisp/ChangeLog 2010-02-22 13:48:52 +0000
@@ -1,3 +1,10 @@
+2010-02-22 Michael Albinus <address@hidden>
+
+ * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect
+ setting the modes by `ignore-errors'. It might fail, for example
+ if the file is not owned by the user but the group.
+ (tramp-handle-write-region): Ensure, that `tmpfile' is always readable.
+
2010-02-21 Chong Yidong <address@hidden>
* files.el (directory-listing-before-filename-regexp): Use
=== modified file 'lisp/net/tramp.el'
--- a/lisp/net/tramp.el 2010-02-18 10:08:48 +0000
+++ b/lisp/net/tramp.el 2010-02-22 13:48:52 +0000
@@ -3926,7 +3926,8 @@
;; Set the mode.
(unless (and keep-date copy-keep-date)
- (set-file-modes newname (tramp-default-file-modes filename))))
+ (ignore-errors
+ (set-file-modes newname (tramp-default-file-modes filename)))))
;; If the operation was `rename', delete the original file.
(unless (eq op 'copy)
@@ -5031,7 +5032,10 @@
;; filename does not exist (eq modes nil) it has been
;; renamed to the backup file. This case `save-buffer'
;; handles permissions.
- (when modes (set-file-modes tmpfile modes))
+ ;; Ensure, that it is still readable.
+ (when modes
+ (set-file-modes
+ tmpfile (logior (or modes 0) (tramp-octal-to-decimal "0400"))))
;; This is a bit lengthy due to the different methods
;; possible for file transfer. First, we check whether the
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99546: * net/tramp.el (tramp-do-copy-or-rename-file-out-of-band): Protect,
Michael Albinus <=