1
0
Fork 0

fixed missing length

This commit is contained in:
Frank Celler 2013-04-05 14:47:45 +02:00
parent 71bf83be1b
commit ab38a0543a
2 changed files with 7 additions and 4 deletions

View File

@ -94,10 +94,13 @@ namespace triagens {
}
if (n < 0) {
TRI_CLOSE(fd);
TRI_set_errno(TRI_ERROR_SYS_ERROR);
LOGGER_TRACE("read failed for '" << filename
<< "' with " << strerror(errno) << " and result " << n
<< " on fd " << fd);
TRI_CLOSE(fd);
THROW_FILE_FUNC_ERROR("read", "", errno);
}
@ -106,7 +109,7 @@ namespace triagens {
TRI_CLOSE(fd);
string r(result.c_str());
string r(result.c_str(), result.length());
return r;
}

View File

@ -2976,9 +2976,9 @@ namespace triagens {
return ok;
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// BASE64
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
string encodeBase64 (string const& in) {
unsigned char charArray3[3];