Mercurial > emacs
changeset 67723:f0ddbd3730d3
(url-cookie-write-file): Create parent dir.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 21 Dec 2005 20:08:49 +0000 |
parents | 3a3904075d3d |
children | cb55ddcf9e4a |
files | lisp/url/ChangeLog lisp/url/url-cookie.el |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/url/ChangeLog Wed Dec 21 20:04:41 2005 +0000 +++ b/lisp/url/ChangeLog Wed Dec 21 20:08:49 2005 +0000 @@ -1,3 +1,9 @@ +2005-12-21 Stefan Monnier <monnier@iro.umontreal.ca> + + * url-cookie.el (url-cookie-write-file): Create parent dir. + + * url.el (url-configuration-directory): Use ~/.emacs.d if possible. + 2005-12-07 Klaus Straubinger <KSNetz@Arcor.DE> (tiny change) * url-cookie.el (url-cookie-save-interval): Simplify.
--- a/lisp/url/url-cookie.el Wed Dec 21 20:04:41 2005 +0000 +++ b/lisp/url/url-cookie.el Wed Dec 21 20:08:49 2005 +0000 @@ -148,6 +148,8 @@ ;;;###autoload (defun url-cookie-write-file (&optional fname) (setq fname (or fname url-cookie-file)) + (unless (file-directory-p (file-name-directory fname)) + (ignore-errors (make-directory (file-name-directory fname)))) (cond ((not url-cookies-changed-since-last-save) nil) ((not (file-writable-p fname)) @@ -155,8 +157,7 @@ (t (url-cookie-clean-up) (url-cookie-clean-up t) - (save-excursion - (set-buffer (get-buffer-create " *cookies*")) + (with-current-buffer (get-buffer-create " *cookies*") (erase-buffer) (fundamental-mode) (insert ";; Emacs-W3 HTTP cookies file\n"