From f8dce815d096990f4be2d1b9e9b80da506d25836 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 4 Oct 2008 20:31:33 +0000 Subject: [PATCH] (make-temp-file): Handle empty `prefix'. (Bug#1081) --- lisp/ChangeLog | 2 ++ lisp/files.el | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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 + * 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 -- 2.39.5