better tmp dir selection
This commit is contained in:
parent
9d19e344d3
commit
347badf770
8 changed files with 83 additions and 52 deletions
|
|
@ -271,15 +271,14 @@ uint32_t OsmIdSet::hash(uint32_t in, int i) const {
|
|||
|
||||
// _____________________________________________________________________________
|
||||
int OsmIdSet::openTmpFile() const {
|
||||
const std::string& fname = getTmpFName(_tmpPath, "");
|
||||
const std::string& fname = getTmpFName("", "");
|
||||
int file = open(fname.c_str(), O_RDWR | O_CREAT, 0666);
|
||||
|
||||
// immediately unlink
|
||||
unlink(fname.c_str());
|
||||
|
||||
if (file < 0) {
|
||||
std::cerr << "Could not open temporary file " << fname
|
||||
<< std::endl;
|
||||
std::cerr << "Could not open temporary file " << fname << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue