This commit is contained in:
2024-10-09 19:36:35 -05:00
parent 854caffea8
commit 67053645e1
13 changed files with 103 additions and 49 deletions

View File

@@ -119,9 +119,11 @@ void file::open() {
}
#if defined(_WIN32)
file_.reset(_fsopen(path_.c_str(), read_only_ ? "rb" : "rb+", _SH_DENYNO));
file_ = file_t(_fsopen(path_.c_str(), read_only_ ? "rb" : "rb+", _SH_DENYNO),
file_deleter());
#else // !defined(_WIN32)
file_.reset(fopen(path_.c_str(), read_only_ ? "rb" : "rb+"));
file_ =
file_t(fopen(path_.c_str(), read_only_ ? "rb" : "rb+"), file_deleter());
#endif // defined(_WIN32)
}