From: Lars Ingebrigtsen Date: Fri, 25 Dec 2015 21:36:32 +0000 (+0100) Subject: Let url use default file modes when copying files X-Git-Tag: emacs-26.0.90~2860 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0697719d7368f232f7c0ba5003387c28908bbfdb;p=emacs.git 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). --- diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index d13df6945a7..6d2a5c2ee4b 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)