Mercurial > hg > orthanc
comparison Core/Uuid.cpp @ 110:fd7b0a3e6260
support of boost 1.42 for debian
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Oct 2012 12:33:31 +0200 |
parents | 9eb40cad7935 |
children | fe180eae201d |
comparison
equal
deleted
inserted
replaced
109:8c0a5666b05f | 110:fd7b0a3e6260 |
---|---|
84 } | 84 } |
85 | 85 |
86 | 86 |
87 TemporaryFile::TemporaryFile() | 87 TemporaryFile::TemporaryFile() |
88 { | 88 { |
89 #if BOOST_HAS_FILESYSTEM_V3 == 1 | |
90 boost::filesystem::path tmpDir = boost::filesystem::temp_directory_path(); | |
91 #elif defined(__linux__) | |
92 boost::filesystem::path tmpDir("/tmp"); | |
93 #else | |
94 #error Support your platform here | |
95 #endif | |
96 | |
89 // We use UUID to create unique path to temporary files | 97 // We use UUID to create unique path to temporary files |
90 boost::filesystem::path tmp = boost::filesystem::temp_directory_path(); | 98 tmpDir /= "Orthanc-" + Orthanc::Toolbox::GenerateUuid(); |
91 tmp /= "Orthanc-" + Orthanc::Toolbox::GenerateUuid(); | 99 path_ = tmpDir.string(); |
92 path_ = tmp.string(); | |
93 } | 100 } |
94 | 101 |
95 | 102 |
96 TemporaryFile::~TemporaryFile() | 103 TemporaryFile::~TemporaryFile() |
97 { | 104 { |