aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-12-15 10:33:39 +0100
committerMartin Ridgers <[email protected]>2021-12-15 10:33:39 +0100
commit840ea09049bfc2e16b8bfc62062f6be7ca57fdf4 (patch)
tree1270167ced17d5d9c4489013f11a894e9b42cc6e
parentCorrected include statement case (diff)
downloadzen-840ea09049bfc2e16b8bfc62062f6be7ca57fdf4.tar.xz
zen-840ea09049bfc2e16b8bfc62062f6be7ca57fdf4.zip
Paths are not wide on non-Windows so WideToUtf8() cannot be used
-rw-r--r--zenstore/filecas.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp
index 4e4502e6d..76b921994 100644
--- a/zenstore/filecas.cpp
+++ b/zenstore/filecas.cpp
@@ -157,7 +157,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash)
}
else
{
- ZEN_WARN("get file size FAILED, file cas '{}'", WideToUtf8(Name.ShardedPath));
+ ZEN_WARN("get file size FAILED, file cas '{}'", Name.ShardedPath.ToUtf8());
}
DeletePayloadFileOnClose();
@@ -183,7 +183,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash)
}
else
{
- ZEN_INFO("Unexpected error opening file '{}': {}", WideToUtf8(Name.ShardedPath), hRes);
+ ZEN_INFO("Unexpected error opening file '{}': {}", Name.ShardedPath.ToUtf8(), hRes);
}
}
}
@@ -390,7 +390,7 @@ FileCasStrategy::InsertChunk(const void* const ChunkData, const size_t ChunkSize
if (FAILED(hRes))
{
- ThrowSystemException(hRes, "Failed to open shard file '{}'"_format(WideToUtf8(Name.ShardedPath)));
+ ThrowSystemException(hRes, "Failed to open shard file '{}'"_format(Name.ShardedPath.ToUtf8()));
}
#else
// Attempt to exclusively create the file.
@@ -497,11 +497,11 @@ FileCasStrategy::DeleteChunk(const IoHash& ChunkHash, std::error_code& Ec)
uint64_t FileSize = static_cast<uint64_t>(std::filesystem::file_size(Name.ShardedPath.c_str(), Ec));
if (Ec)
{
- ZEN_WARN("get file size FAILED, file cas '{}'", WideToUtf8(Name.ShardedPath));
+ ZEN_WARN("get file size FAILED, file cas '{}'", Name.ShardedPath.ToUtf8());
FileSize = 0;
}
- ZEN_DEBUG("deleting CAS payload file '{}' {}", WideToUtf8(Name.ShardedPath), NiceBytes(FileSize));
+ ZEN_DEBUG("deleting CAS payload file '{}' {}", Name.ShardedPath.ToUtf8(), NiceBytes(FileSize));
std::filesystem::remove(Name.ShardedPath.c_str(), Ec);