1
0
Fork 0

warn when closing a datafile fails

This commit is contained in:
Jan Steemann 2016-01-20 09:44:45 +01:00
parent 0a80bcd17d
commit ec17068875
1 changed files with 5 additions and 1 deletions

View File

@ -72,7 +72,11 @@ static void CloseDatafile(TRI_datafile_t* const datafile) {
TRI_ASSERT(datafile->_state != TRI_DF_STATE_CLOSED);
if (datafile->isPhysical(datafile)) {
TRI_CLOSE(datafile->_fd);
int res = TRI_CLOSE(datafile->_fd);
if (res != TRI_ERROR_NO_ERROR) {
LOG_ERROR("unable to close datafile '%s': %d", datafile->getName(datafile), res);
}
}
datafile->_state = TRI_DF_STATE_CLOSED;