diff options
| author | Dan Engelbrecht <[email protected]> | 2022-05-23 14:44:48 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-05-23 14:44:48 +0200 |
| commit | dba8b362221188c4e3125e39eb0654613a7d3dd2 (patch) | |
| tree | 13081a3d19734cd0e284e4a4818adf025ba7c7bd | |
| parent | Add catch2 support (#101) (diff) | |
| download | zen-dba8b362221188c4e3125e39eb0654613a7d3dd2.tar.xz zen-dba8b362221188c4e3125e39eb0654613a7d3dd2.zip | |
De/fix namespace folder scanning (#103)
| -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); } |