diff options
| author | Glenn Morris | 2009-09-13 02:09:12 +0000 |
|---|---|---|
| committer | Glenn Morris | 2009-09-13 02:09:12 +0000 |
| commit | 4f0f48dfc10906f2af1ed35afe8624670f4d7c1a (patch) | |
| tree | 403d893d2fe571da6de3ce8a43ab97b3e671d41e | |
| parent | 5d6ab6725966988280a28cbd0acd76996a26560e (diff) | |
| download | emacs-4f0f48dfc10906f2af1ed35afe8624670f4d7c1a.tar.gz emacs-4f0f48dfc10906f2af1ed35afe8624670f4d7c1a.zip | |
(url-file): Avoid assignment to free variable `filename'.
| -rw-r--r-- | lisp/url/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/url/url-file.el | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index eddc27b09c7..fa6ce1945b1 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-09-13 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * url-file.el (url-file): Avoid assignment to free variable `filename'. | ||
| 4 | |||
| 1 | 2009-09-12 Chong Yidong <cyd@stupidchicken.com> | 5 | 2009-09-12 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 6 | ||
| 3 | * url-methods.el (url-scheme--registering-proxy): New variable. | 7 | * url-methods.el (url-scheme--registering-proxy): New variable. |
diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index e58da0e302a..f0808a34872 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el | |||
| @@ -156,13 +156,9 @@ to them." | |||
| 156 | (uncompressed-filename nil) | 156 | (uncompressed-filename nil) |
| 157 | (content-type nil) | 157 | (content-type nil) |
| 158 | (content-encoding nil) | 158 | (content-encoding nil) |
| 159 | (coding-system-for-read 'binary)) | 159 | (coding-system-for-read 'binary) |
| 160 | 160 | (filename (url-file-build-filename url))) | |
| 161 | (setq filename (url-file-build-filename url)) | 161 | (or filename (error "File does not exist: %s" (url-recreate-url url))) |
| 162 | |||
| 163 | (if (not filename) | ||
| 164 | (error "File does not exist: %s" (url-recreate-url url))) | ||
| 165 | |||
| 166 | ;; Need to figure out the content-type from the real extension, | 162 | ;; Need to figure out the content-type from the real extension, |
| 167 | ;; not the compressed one. | 163 | ;; not the compressed one. |
| 168 | (setq uncompressed-filename (if (string-match "\\.\\(gz\\|Z\\|z\\)$" filename) | 164 | (setq uncompressed-filename (if (string-match "\\.\\(gz\\|Z\\|z\\)$" filename) |