diff options
| author | Stefan Monnier | 2005-12-21 20:08:49 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-12-21 20:08:49 +0000 |
| commit | 32fa584479d717ce8ea65abe39c3da3da04fa62e (patch) | |
| tree | 9ac608b0dd893590edf2946cdd14e2c9970fc4e6 | |
| parent | 208d45772d458f8ab025663040cbd5f34f4ff54d (diff) | |
| download | emacs-32fa584479d717ce8ea65abe39c3da3da04fa62e.tar.gz emacs-32fa584479d717ce8ea65abe39c3da3da04fa62e.zip | |
(url-cookie-write-file): Create parent dir.
| -rw-r--r-- | lisp/url/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/url/url-cookie.el | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 81ba66736b0..9abb65d389d 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2005-12-21 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * url-cookie.el (url-cookie-write-file): Create parent dir. | ||
| 4 | |||
| 5 | * url.el (url-configuration-directory): Use ~/.emacs.d if possible. | ||
| 6 | |||
| 1 | 2005-12-07 Klaus Straubinger <KSNetz@Arcor.DE> (tiny change) | 7 | 2005-12-07 Klaus Straubinger <KSNetz@Arcor.DE> (tiny change) |
| 2 | 8 | ||
| 3 | * url-cookie.el (url-cookie-save-interval): Simplify. | 9 | * url-cookie.el (url-cookie-save-interval): Simplify. |
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 480a16c204d..3772846607a 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el | |||
| @@ -148,6 +148,8 @@ telling Microsoft that." | |||
| 148 | ;;;###autoload | 148 | ;;;###autoload |
| 149 | (defun url-cookie-write-file (&optional fname) | 149 | (defun url-cookie-write-file (&optional fname) |
| 150 | (setq fname (or fname url-cookie-file)) | 150 | (setq fname (or fname url-cookie-file)) |
| 151 | (unless (file-directory-p (file-name-directory fname)) | ||
| 152 | (ignore-errors (make-directory (file-name-directory fname)))) | ||
| 151 | (cond | 153 | (cond |
| 152 | ((not url-cookies-changed-since-last-save) nil) | 154 | ((not url-cookies-changed-since-last-save) nil) |
| 153 | ((not (file-writable-p fname)) | 155 | ((not (file-writable-p fname)) |
| @@ -155,8 +157,7 @@ telling Microsoft that." | |||
| 155 | (t | 157 | (t |
| 156 | (url-cookie-clean-up) | 158 | (url-cookie-clean-up) |
| 157 | (url-cookie-clean-up t) | 159 | (url-cookie-clean-up t) |
| 158 | (save-excursion | 160 | (with-current-buffer (get-buffer-create " *cookies*") |
| 159 | (set-buffer (get-buffer-create " *cookies*")) | ||
| 160 | (erase-buffer) | 161 | (erase-buffer) |
| 161 | (fundamental-mode) | 162 | (fundamental-mode) |
| 162 | (insert ";; Emacs-W3 HTTP cookies file\n" | 163 | (insert ";; Emacs-W3 HTTP cookies file\n" |