emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/backports-25.2 a33eb50 03/46: Let url use default


From: Noam Postavsky
Subject: [Emacs-diffs] scratch/backports-25.2 a33eb50 03/46: Let url use default file modes when copying files
Date: Sun, 2 Oct 2016 14:04:47 +0000 (UTC)

branch: scratch/backports-25.2
commit a33eb502e4b10b9f3bf86e53f4dd08bf3979af26
Author: Lars Ingebrigtsen <address@hidden>
Commit: Noam Postavsky <address@hidden>

    Let url use default file modes when copying files
    
    * lisp/url/url-handlers.el (url-copy-file): Use default file
    modes when copying files (bug#11400).
    
    (cherry picked from commit 0697719d7368f232f7c0ba5003387c28908bbfdb)
---
 lisp/url/url-handlers.el |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el
index 717651d..d3be880 100644
--- a/lisp/url/url-handlers.el
+++ b/lisp/url/url-handlers.el
@@ -269,7 +269,8 @@ A prefix arg makes KEEP-TIME non-nil."
        (error "Opening input file: No such file or directory, %s" url))
     (with-current-buffer buffer
       (setq handle (mm-dissect-buffer t)))
-    (mm-save-part-to-file handle newname)
+    (let ((mm-attachment-file-modes (default-file-modes)))
+      (mm-save-part-to-file handle newname))
     (kill-buffer buffer)
     (mm-destroy-parts handle)))
 (put 'copy-file 'url-file-handlers 'url-copy-file)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]