diff options
| author | Martin Ridgers <[email protected]> | 2021-11-02 15:06:40 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-02 15:29:02 +0100 |
| commit | dc9a78aa39f0ce714554306b59d6a66fbbebcbce (patch) | |
| tree | a0692e7e940feaa11acb0d5282e7b79601b53565 /zenserver/cache/structuredcachestore.cpp | |
| parent | CacheBucket::BuildPath() uses a PathBuilder instead of a WideStrBuilder (diff) | |
| download | zen-dc9a78aa39f0ce714554306b59d6a66fbbebcbce.tar.xz zen-dc9a78aa39f0ce714554306b59d6a66fbbebcbce.zip | |
ZenCacheDiskLayer::DiscoverBuckets() was using wstring for paths
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
| -rw-r--r-- | zenserver/cache/structuredcachestore.cpp | 10 |
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()) { |