diff options
| -rw-r--r-- | zenserver/cache/structuredcachestore.cpp | 2 | ||||
| -rw-r--r-- | zenstore/gc.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp index da948fd72..7509c5a71 100644 --- a/zenserver/cache/structuredcachestore.cpp +++ b/zenserver/cache/structuredcachestore.cpp @@ -2141,7 +2141,7 @@ ZenCacheStore::ZenCacheStore(CasGc& Gc, std::filesystem::path BasePath) : GcStor std::vector<std::string> Namespaces; for (const std::filesystem::path& DirPath : DirContent.Directories) { - std::string DirName = PathToUtf8(DirPath.stem()); + std::string DirName = PathToUtf8(DirPath.filename()); if (DirName.starts_with(NamespaceDiskPrefix)) { Namespaces.push_back(DirName.substr(NamespaceDiskPrefix.length())); diff --git a/zenstore/gc.cpp b/zenstore/gc.cpp index 4b50668d9..8e2d441f8 100644 --- a/zenstore/gc.cpp +++ b/zenstore/gc.cpp @@ -343,7 +343,7 @@ GcStorage::GcStorage(CasGc& Gc) : m_Gc(Gc) GcStorage::~GcStorage() { - m_Gc.AddGcStorage(this); + m_Gc.RemoveGcStorage(this); } ////////////////////////////////////////////////////////////////////////// @@ -373,6 +373,7 @@ CasGc::RemoveGcContributor(GcContributor* Contributor) void CasGc::AddGcStorage(GcStorage* Storage) { + ZEN_ASSERT(Storage != nullptr); RwLock::ExclusiveLockScope _(m_Lock); m_GcStorage.push_back(Storage); } |