Skip to content

Commit

Permalink
feat: Windows環境でFILE_FLAG_DELETE_ON_CLOSEを付けて開かれている辞書を扱えるようにする (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabonerune authored Jan 14, 2025
1 parent e8a9910 commit b9b1bf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/mecab/src/mmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ template <class T> class Mmap {
}

#if 0 /* for Open JTalk */
hFile = ::CreateFileA(filename, mode1, FILE_SHARE_READ, 0,
hFile = ::CreateFileA(filename, mode1, FILE_SHARE_READ | FILE_SHARE_DELETE, 0,
#else
hFile = ::CreateFileW(WPATH(filename), mode1, FILE_SHARE_READ, 0,
hFile = ::CreateFileW(WPATH(filename), mode1, FILE_SHARE_READ | FILE_SHARE_DELETE, 0,
#endif
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
CHECK_FALSE(hFile != INVALID_HANDLE_VALUE)
Expand Down

0 comments on commit b9b1bf6

Please sign in to comment.