diff options
| author | Dan Engelbrecht <[email protected]> | 2023-05-24 15:15:02 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-24 15:15:02 +0200 |
| commit | c69b7341838f86f73519e20b83996b609cda7f6c (patch) | |
| tree | 394a00b17814c943059513f4781065c236753d3b /src/zenserver/projectstore/projectstore.cpp | |
| parent | cache log sessionid (#297) (diff) | |
| download | zen-c69b7341838f86f73519e20b83996b609cda7f6c.tar.xz zen-c69b7341838f86f73519e20b83996b609cda7f6c.zip | |
block destructors from throwing exceptions (#321)
* ~FileMapping() is not allowed to throw exceptions
* ~ScopedActivityBase() should not call ZEN_ASSERT (which causes SIGABORT on error)
* ProjectStore::Project::WriteAccessTimes() which is called from ProjectStore::~Project() must not throw exceptions
* changelog
Diffstat (limited to 'src/zenserver/projectstore/projectstore.cpp')
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index 4b0c801bc..deae58508 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -1144,14 +1144,14 @@ ProjectStore::Project::WriteAccessTimes() Writer.Save(Mem); - CreateDirectories(m_OplogStoragePath); + try + { + CreateDirectories(m_OplogStoragePath); - std::filesystem::path ProjectAccessTimesFilePath = m_OplogStoragePath / "AccessTimes.zcb"sv; + std::filesystem::path ProjectAccessTimesFilePath = m_OplogStoragePath / "AccessTimes.zcb"sv; - ZEN_INFO("persisting access times for project '{}' to {}", Identifier, ProjectAccessTimesFilePath); + ZEN_INFO("persisting access times for project '{}' to {}", Identifier, ProjectAccessTimesFilePath); - try - { BasicFile Blob; Blob.Open(ProjectAccessTimesFilePath, BasicFile::Mode::kTruncate); Blob.Write(Mem.Data(), Mem.Size(), 0); |