Ticket #2967: interprocess_get_temporary_path.patch

File interprocess_get_temporary_path.patch, 698 bytes (added by Lawrence Gold <lgold@…>, 13 years ago)
  • boost/interprocess/detail/os_file_functions.hpp

     
    311311
    312312inline const char *get_temporary_path()
    313313
     314   struct stat data;
    314315   const char *dir = std::getenv("TMPDIR");
    315    if(!dir){
     316   if(!dir || ::stat(dir, &data) != 0){
    316317      dir = std::getenv("TMP");
    317       if(!dir){
     318      if(!dir || ::stat(dir, &data) != 0){
    318319         dir = std::getenv("TEMP");
    319          if(!dir){
     320         if(!dir || ::stat(dir, &data) != 0){
    320321            dir = "/tmp";
    321322         }
    322323      }