Ticket #2967: interprocess_get_temporary_path.patch
File interprocess_get_temporary_path.patch, 698 bytes (added by , 13 years ago) |
---|
-
boost/interprocess/detail/os_file_functions.hpp
311 311 312 312 inline const char *get_temporary_path() 313 313 { 314 struct stat data; 314 315 const char *dir = std::getenv("TMPDIR"); 315 if(!dir ){316 if(!dir || ::stat(dir, &data) != 0){ 316 317 dir = std::getenv("TMP"); 317 if(!dir ){318 if(!dir || ::stat(dir, &data) != 0){ 318 319 dir = std::getenv("TEMP"); 319 if(!dir ){320 if(!dir || ::stat(dir, &data) != 0){ 320 321 dir = "/tmp"; 321 322 } 322 323 }