Merge "Open dictionary files always using O_RDONLY."
This commit is contained in:
commit
45d5d1e589
1 changed files with 1 additions and 2 deletions
|
@ -30,8 +30,7 @@ namespace latinime {
|
|||
/* static */ MmappedBuffer::MmappedBufferPtr MmappedBuffer::openBuffer(
|
||||
const char *const path, const int bufferOffset, const int bufferSize,
|
||||
const bool isUpdatable) {
|
||||
const int openMode = isUpdatable ? O_RDWR : O_RDONLY;
|
||||
const int mmapFd = open(path, openMode);
|
||||
const int mmapFd = open(path, O_RDONLY);
|
||||
if (mmapFd < 0) {
|
||||
AKLOGE("DICT: Can't open the source. path=%s errno=%d", path, errno);
|
||||
return MmappedBufferPtr(0);
|
||||
|
|
Loading…
Reference in a new issue