thomasmoelhave / tpie

Templated Portable I/O Environment
Other
112 stars 24 forks source link

set_default_path() doesn't reset global subdir variable #178

Closed freekvw closed 9 years ago

freekvw commented 9 years ago

Since ac4f68249cc0911e5b21f8de01a98f3be7d18c1a tpie uses a global subdir variable that isn't reset when changing the temporary path later using set_default_path(). Related to this, it would be nice if there would be a function to test whether a temporary path is usable for TPIE without needing to do set_default_path() and tpie_name()/gen_temp().

svendcs commented 9 years ago

As of 36ae8ae3d0fb18af069847988d11ae419f86f899 TPIE will reset the global subdir when the default path is changed. I've implemented tempname::try_directory that tests whether tpie is able to create/use a folder.