Commit d8afad26 authored by Karl Heuer's avatar Karl Heuer
Browse files

(Fmake_temp_name): Detect error return from mktemp.

parent 0593f446
...@@ -797,6 +797,7 @@ which has no existing file.") ...@@ -797,6 +797,7 @@ which has no existing file.")
(prefix) (prefix)
Lisp_Object prefix; Lisp_Object prefix;
{ {
char *temp;
Lisp_Object val; Lisp_Object val;
#ifdef MSDOS #ifdef MSDOS
/* Don't use too many characters of the restricted 8+3 DOS /* Don't use too many characters of the restricted 8+3 DOS
...@@ -805,7 +806,10 @@ which has no existing file.") ...@@ -805,7 +806,10 @@ which has no existing file.")
#else #else
val = concat2 (prefix, build_string ("XXXXXX")); val = concat2 (prefix, build_string ("XXXXXX"));
#endif #endif
mktemp (XSTRING (val)->data); temp = mktemp (XSTRING (val)->data);
if (! temp)
error ("No temporary file names based on %s are available",
XSTRING (prefix)->data);
#ifdef DOS_NT #ifdef DOS_NT
CORRECT_DIR_SEPS (XSTRING (val)->data); CORRECT_DIR_SEPS (XSTRING (val)->data);
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment