changeset 104992:d5da691bfe56

(url-file): Avoid assignment to free variable `filename'.
author Glenn Morris <rgm@gnu.org>
date Sun, 13 Sep 2009 02:09:12 +0000
parents 0b7fb1bd00dc
children 403125cdfb24
files lisp/url/ChangeLog lisp/url/url-file.el
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/url/ChangeLog	Sun Sep 13 01:47:03 2009 +0000
+++ b/lisp/url/ChangeLog	Sun Sep 13 02:09:12 2009 +0000
@@ -1,3 +1,7 @@
+2009-09-13  Glenn Morris  <rgm@gnu.org>
+
+	* url-file.el (url-file): Avoid assignment to free variable `filename'.
+
 2009-09-12  Chong Yidong  <cyd@stupidchicken.com>
 
 	* url-methods.el (url-scheme--registering-proxy): New variable.
--- a/lisp/url/url-file.el	Sun Sep 13 01:47:03 2009 +0000
+++ b/lisp/url/url-file.el	Sun Sep 13 02:09:12 2009 +0000
@@ -156,13 +156,9 @@
 	 (uncompressed-filename nil)
 	 (content-type nil)
 	 (content-encoding nil)
-	 (coding-system-for-read 'binary))
-
-    (setq filename (url-file-build-filename url))
-
-    (if (not filename)
-	(error "File does not exist: %s" (url-recreate-url url)))
-
+	 (coding-system-for-read 'binary)
+	 (filename (url-file-build-filename url)))
+    (or filename (error "File does not exist: %s" (url-recreate-url url)))
     ;; Need to figure out the content-type from the real extension,
     ;; not the compressed one.
     (setq uncompressed-filename (if (string-match "\\.\\(gz\\|Z\\|z\\)$" filename)