From d6c9c1a7d1641e0300cfd084ba703fc5ff051911 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Mon, 18 Oct 2021 14:03:53 +0200 Subject: Use cross-platform ExtPathBuilder instead of ExtWideStrBuilder --- zenstore/filecas.cpp | 6 +++--- zenstore/filecas.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp index 3941499f1..98807960d 100644 --- a/zenstore/filecas.cpp +++ b/zenstore/filecas.cpp @@ -35,7 +35,6 @@ using namespace fmt::literals; FileCasStrategy::ShardingHelper::ShardingHelper(const std::filesystem::path& RootPath, const IoHash& ChunkHash) { ShardedPath.Append(RootPath.c_str()); - ShardedPath.Append(std::filesystem::path::preferred_separator); ExtendableStringBuilder<64> HashString; ChunkHash.ToHexString(HashString); @@ -55,13 +54,14 @@ FileCasStrategy::ShardingHelper::ShardingHelper(const std::filesystem::path& Roo // would probably be a good idea to measure performance for different // policies and chunk counts + ShardedPath.AppendSeparator(); ShardedPath.AppendAsciiRange(str, str + 3); - ShardedPath.Append(std::filesystem::path::preferred_separator); + ShardedPath.AppendSeparator(); ShardedPath.AppendAsciiRange(str + 3, str + 5); Shard2len = ShardedPath.Size(); - ShardedPath.Append(std::filesystem::path::preferred_separator); + ShardedPath.AppendSeparator(); ShardedPath.AppendAsciiRange(str + 5, str + 40); } diff --git a/zenstore/filecas.h b/zenstore/filecas.h index 8f36c0170..04ffffdd2 100644 --- a/zenstore/filecas.h +++ b/zenstore/filecas.h @@ -4,9 +4,9 @@ #include +#include #include #include -#include #include #include @@ -52,8 +52,8 @@ private: { ShardingHelper(const std::filesystem::path& RootPath, const IoHash& ChunkHash); - size_t Shard2len = 0; - ExtendableWideStringBuilder<128> ShardedPath; + size_t Shard2len = 0; + ExtendablePathBuilder<128> ShardedPath; }; }; -- cgit v1.2.3