Boost C++ Libraries: Ticket #11051: filesystem::temp_directory_path() fails on OSX https://svn.boost.org/trac10/ticket/11051 <p> On OSX the call to filesystem::temp_directory_path() throws an exception with error ENOTDIR. </p> <p> This happens because on OSX the environment variable TMPDIR has a trailing /. There are quite a few references to this on the web. </p> <p> On my system OSX 10.10.2 the TMPDIR is set to: /var/folders/<a class="changeset" href="https://svn.boost.org/trac10/changeset/8/y110f55j7ws94zpl8wfdpfpx13r441/T" title="Initial content for next-gen Boost website. ">r8/y110f55j7ws94zpl8wfdpfpx13r441/T/</a> </p> <p> Workaround: Use </p> <blockquote> <p> system::error_code ec; filesystem::path p = filesystem::temp_directory_path(ec); </p> </blockquote> <p> and ignore the error code. (which is ENOTDIR) </p> <p> Suggested fix: Remove trailing / after getting environment variable in "boost_1_57_0\libs\filesystem\src\operations.cpp" at around line 1770. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11051 Trac 1.4.3