Logs: remove mem-mapped buffer and move instance lock to main.cpp

Part of the work to untangle utilities from RPCS3-specific things.
This commit is contained in:
Nekotekina 2020-03-06 21:11:47 +03:00
parent 1669e95870
commit 2209be5216
4 changed files with 54 additions and 82 deletions

View file

@ -1147,7 +1147,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
return;
}
if (mode & fs::trunc && mode & (fs::lock + fs::unread))
if (mode & fs::trunc && mode & (fs::lock + fs::unread) && mode & fs::write)
{
// Postpone truncation in order to avoid using O_TRUNC on a locked file
verify(HERE), ::ftruncate(fd, 0) == 0;