mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Enable unlink of temporary trace files for WINNT only. This is temporary solution.
This commit is contained in:
parent
9d377001a7
commit
bdcdb6a328
@ -85,7 +85,7 @@ ConfigStorage::~ConfigStorage()
|
||||
::close(m_cfg_file);
|
||||
m_cfg_file = -1;
|
||||
#ifdef WIN_NT
|
||||
// unlink((char*) &m_base->cfg_file_name[0]);
|
||||
unlink((char*) &m_base->cfg_file_name[0]);
|
||||
#endif
|
||||
|
||||
ISC_STATUS_ARRAY status;
|
||||
@ -125,6 +125,7 @@ void ConfigStorage::initShMem(void* arg, SH_MEM_T* shmemData, bool initialize)
|
||||
header->version = 1;
|
||||
header->change_number = 0;
|
||||
header->session_number = 1;
|
||||
memset(header->cfg_file_name, 0, sizeof(header->cfg_file_name));
|
||||
#ifndef WIN_NT
|
||||
checkMutex("init", ISC_mutex_init(&header->mutex));
|
||||
#endif
|
||||
|
@ -101,7 +101,9 @@ TraceLogImpl::~TraceLogImpl()
|
||||
ISC_unmap_file(status, &m_handle);
|
||||
|
||||
if (m_reader || readerDone) {
|
||||
// unlink(m_baseFileName.c_str());
|
||||
#ifdef WIN_NT
|
||||
unlink(m_baseFileName.c_str());
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -126,8 +128,11 @@ int TraceLogImpl::removeFile(int fileNum)
|
||||
{
|
||||
PathName fileName;
|
||||
fileName.printf("%s.%07ld", m_baseFileName.c_str(), fileNum);
|
||||
// return unlink(fileName.c_str());
|
||||
#ifdef WIN_NT
|
||||
return unlink(fileName.c_str());
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
size_t TraceLogImpl::read(void* buf, size_t size)
|
||||
|
Loading…
Reference in New Issue
Block a user