From a8fccd55698e29c007bfbcb8b375db2e888b4261 Mon Sep 17 00:00:00 2001 From: Robert Ramey Date: Tue, 20 Jul 2004 20:42:16 +0000 Subject: [PATCH] assert on failure [SVN r23851] --- include/boost/archive/tmpdir.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/boost/archive/tmpdir.hpp b/include/boost/archive/tmpdir.hpp index 0d5f3fd8..397dd1c7 100644 --- a/include/boost/archive/tmpdir.hpp +++ b/include/boost/archive/tmpdir.hpp @@ -17,6 +17,8 @@ // See http://www.boost.org for updates, documentation, and revision history. #include // getenv +#include + #ifdef BOOST_NO_STDC_NAMESPACE namespace std { using ::getenv; @@ -33,8 +35,10 @@ char * tmpdir(){ dirname = std::getenv("TMPDIR"); if(NULL == dirname) dirname = std::getenv("TEMP"); - if(NULL == dirname) - dirname = "/tmp"; + if(NULL == dirname){ + assert(false); // no temp directory found + dirname = "."; + } return dirname; }