diff lisp/url/url-file.el @ 101888:074256e82966

(url-file): Use make-temp-file.
author Chong Yidong <cyd@stupidchicken.com>
date Sat, 07 Feb 2009 21:22:55 +0000
parents a9dc0e7c3f2b
children dbd882f3da46
line wrap: on
line diff
--- a/lisp/url/url-file.el	Sat Feb 07 21:22:34 2009 +0000
+++ b/lisp/url/url-file.el	Sat Feb 07 21:22:55 2009 +0000
@@ -88,7 +88,6 @@
 (declare-function ange-ftp-copy-file-internal "ange-ftp"
 		  (filename newname ok-if-already-exists
 			    keep-date &optional msg cont nowait))
-(declare-function url-generate-unique-filename "url-util" (&optional fmt))
 
 (defun url-file-build-filename (url)
   (if (not (vectorp url))
@@ -202,10 +201,8 @@
 					(current-buffer)
 					callback cbargs))
 	  ;; FTP handling
-	  (let* ((extension (url-file-extension filename))
-		 (new (url-generate-unique-filename
-		       (and (> (length extension) 0)
-			    (concat "%s." extension)))))
+	  (let ((new (make-temp-file
+		      (format "url-tmp.%d" (user-real-uid)))))
 	    (if (featurep 'ange-ftp)
 		(ange-ftp-copy-file-internal filename (expand-file-name new) t
 					     nil t