Skip to content

Commit 059cb5b

Browse files
committed
Remove MMF resize throw; Locks in place
1 parent f1c103e commit 059cb5b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/MemoryMappedFile.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,15 @@ bool MemoryMappedFile::map(const std::string& fileName, size_t fileSize)
100100
}
101101
}
102102

103+
// We don't care if the file exists.
104+
// Locks are in place that make sure we don't get here unless we're allowed to
103105
// Check the file exists
104-
{
106+
/*{
105107
if (bfs::exists(fileName) && (bfs::file_size(fileName) != fileSize)) {
106108
BOOST_THROW_EXCEPTION(MemoryMapException()
107109
<< ErrorInfo::Message("File already exists, but mismatching file size. Resizing dangerous."));
108110
}
109-
}
111+
}*/
110112

111113
// Similar operation to calling "touch" command, making sure the file exists
112114
try {

0 commit comments

Comments
 (0)