]> git.eshelyaron.com Git - emacs.git/commitdiff
(make-temp-file): Handle empty `prefix'. (Bug#1081)
authorGlenn Morris <rgm@gnu.org>
Sat, 4 Oct 2008 20:31:33 +0000 (20:31 +0000)
committerGlenn Morris <rgm@gnu.org>
Sat, 4 Oct 2008 20:31:33 +0000 (20:31 +0000)
lisp/ChangeLog
lisp/files.el

index 61004dcc163bdf182908e4538f6a7e4606aa75d2..550d787c753cd967e4febff7825f702621b52b82 100644 (file)
@@ -1,5 +1,7 @@
 2008-10-04  Glenn Morris  <rgm@gnu.org>
 
+       * files.el (make-temp-file): Handle empty `prefix'.  (Bug#1081)
+
        * vc-svn.el (vc-svn-after-dir-status): Handle `svn status -u' output.
        (vc-svn-dir-status): Respect vc-stay-local-p.  (Bug#1046)
 
index 439223e1f09b5a0a2b30ff9c2247d6edeef84d67..10c4574cb5394be0591efc5efa0d78d90481092b 100644 (file)
@@ -976,7 +976,11 @@ If SUFFIX is non-nil, add that at the end of the file name."
                     (progn
                       (setq file
                             (make-temp-name
-                             (expand-file-name prefix temporary-file-directory)))
+                              (if (zerop (length prefix))
+                                  (file-name-as-directory
+                                   temporary-file-directory)
+                                (expand-file-name prefix
+                                                  temporary-file-directory))))
                       (if suffix
                           (setq file (concat file suffix)))
                       (if dir-flag