aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index 1042bbaee..9c5f88d47 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -908,11 +908,11 @@ ZenCacheDiskLayer::DiscoverBuckets()
virtual bool VisitDirectory([[maybe_unused]] const std::filesystem::path& Parent, const path_view& DirectoryName) override
{
- Dirs.push_back(std::wstring(DirectoryName));
+ Dirs.push_back((decltype(Dirs)::value_type)(DirectoryName));
return false;
}
- std::vector<std::wstring> Dirs;
+ std::vector<std::filesystem::path::string_type> Dirs;
} Visit;
Traversal.TraverseFileSystem(m_RootDir, Visit);
@@ -921,11 +921,15 @@ ZenCacheDiskLayer::DiscoverBuckets()
RwLock::ExclusiveLockScope _(m_Lock);
- for (const std::wstring& BucketName : Visit.Dirs)
+ for (const auto& BucketName : Visit.Dirs)
{
// New bucket needs to be created
+#if ZEN_PLATFORM_WINDOWS
std::string BucketName8 = WideToUtf8(BucketName);
+#else
+ const auto& BucketName8 = BucketName;
+#endif
if (auto It = m_Buckets.find(BucketName8); It != m_Buckets.end())
{