summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2008-10-04 20:31:33 +0000
committerGlenn Morris <rgm@gnu.org>2008-10-04 20:31:33 +0000
commitf8dce815d096990f4be2d1b9e9b80da506d25836 (patch)
tree4aff226bcc9281529ccc54b53d95e5f5a8a664ad
parenta80a6b030822c104b89d36106b2bbabf74b62c60 (diff)
downloademacs-f8dce815d096990f4be2d1b9e9b80da506d25836.tar.gz
(make-temp-file): Handle empty `prefix'. (Bug#1081)
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/files.el6
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 61004dcc163..550d787c753 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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)
diff --git a/lisp/files.el b/lisp/files.el
index 439223e1f09..10c4574cb53 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -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