From 91b31318b2390d827d2a0c2a890d54cbf132dc63 Mon Sep 17 00:00:00 2001 From: Florent Devillechabrol Date: Mon, 24 Mar 2025 11:22:40 -0700 Subject: Fixed missing trailing quote when converting binary data from compact binary to json --- CHANGELOG.md | 1 + src/zencore/compactbinaryjson.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51a6f2bb8..fbce9a19e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - Bugfix: Fixed crash during download when trying to write outside a file range - Bugfix: MacOS / Linux zen build download now works correctly - Bugfix: Env auth parsing blocked parsing OAuth and OpenId options + - Bugfix: Fixed missing trailing quote when converting binary data from compact binary to json ## 5.6.0 - Feature: Added support for `--trace`, `--tracehost` and `--tracefile` options to zen CLI command diff --git a/src/zencore/compactbinaryjson.cpp b/src/zencore/compactbinaryjson.cpp index d8c8a8584..68ed09549 100644 --- a/src/zencore/compactbinaryjson.cpp +++ b/src/zencore/compactbinaryjson.cpp @@ -293,6 +293,7 @@ private: const uint32_t EncodedSize = Base64::GetEncodedDataSize(uint32_t(Value.GetSize())); const size_t EncodedIndex = Builder.AddUninitialized(size_t(EncodedSize)); Base64::Encode(static_cast(Value.GetData()), uint32_t(Value.GetSize()), Builder.Data() + EncodedIndex); + Builder << '"'; } private: -- cgit v1.2.3 From 8e9a0b2d7a386dd390ab4b23c563b994e5f79f7a Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 2 Apr 2025 20:00:27 +0200 Subject: upload fail mac linux (#338) * fix macos/linux path resolving --- CHANGELOG.md | 1 + src/zen/cmds/builds_cmd.cpp | 28 +++++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 19b525bf2..6ca445cb9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## - **EXPERIMENTAL** `zen builds` + - Bugfix: Fixed upload failure on Mac/Linux if `--zen-folder-path` was not given. UE-265170 - Feature: `zen builds upload` command has new option `--find-max-block-count` to control how many blocks we search for reuse. - Improvement: Bumped the default number of blocks to search during upload to 10000 (from 5000). - Bugfix: Fixed missing trailing quote when converting binary data from compact binary to json diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp index 8e8fd480a..ba2564fad 100644 --- a/src/zen/cmds/builds_cmd.cpp +++ b/src/zen/cmds/builds_cmd.cpp @@ -164,9 +164,9 @@ namespace { ); - std::filesystem::path MakeSafeAbsolutePath(const std::string Path) + std::filesystem::path MakeSafeAbsolutePath(std::filesystem::path Path) { - std::filesystem::path AbsolutePath = std::filesystem::absolute(StringToPath(Path)).make_preferred(); + std::filesystem::path AbsolutePath = std::filesystem::absolute(Path).make_preferred(); #if ZEN_PLATFORM_WINDOWS && 1 const std::string_view Prefix = "\\\\?\\"; const std::u8string PrefixU8(Prefix.begin(), Prefix.end()); @@ -180,6 +180,8 @@ namespace { return AbsolutePath; } + std::filesystem::path MakeSafeAbsolutePath(const std::string PathString) { return MakeSafeAbsolutePath(StringToPath(PathString)); } + void RenameFileWithRetry(const std::filesystem::path& SourcePath, const std::filesystem::path& TargetPath) { std::error_code Ec; @@ -9061,8 +9063,9 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) BuildStorage::Statistics StorageStats; BuildStorageCache::Statistics StorageCacheStats; - const std::filesystem::path ZenFolderPath = - m_ZenFolderPath.empty() ? MakeSafeAbsolutePath(".") / ZenFolderName : MakeSafeAbsolutePath(m_ZenFolderPath); + const std::filesystem::path ZenFolderPath = m_ZenFolderPath.empty() + ? MakeSafeAbsolutePath(std::filesystem::current_path()) / ZenFolderName + : MakeSafeAbsolutePath(m_ZenFolderPath); CreateDirectories(ZenFolderPath); auto _ = MakeGuard([ZenFolderPath]() { if (CleanDirectory(ZenFolderPath, {})) @@ -9176,8 +9179,9 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) BuildStorage::Statistics StorageStats; BuildStorageCache::Statistics StorageCacheStats; - const std::filesystem::path ZenFolderPath = - m_ZenFolderPath.empty() ? MakeSafeAbsolutePath(".") / ZenFolderName : MakeSafeAbsolutePath(m_ZenFolderPath); + const std::filesystem::path ZenFolderPath = m_ZenFolderPath.empty() + ? MakeSafeAbsolutePath(std::filesystem::current_path()) / ZenFolderName + : MakeSafeAbsolutePath(m_ZenFolderPath); CreateDirectories(ZenFolderPath); auto _ = MakeGuard([ZenFolderPath]() { if (CleanDirectory(ZenFolderPath, {})) @@ -9227,7 +9231,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) m_BuildPartName, Path, ZenFolderPath, - MakeSafeAbsolutePath(m_ManifestPath), + m_ManifestPath.empty() ? std::filesystem::path{} : MakeSafeAbsolutePath(m_ManifestPath), m_FindBlockMaxCount, m_BlockReuseMinPercentLimit, m_AllowMultiparts, @@ -9777,8 +9781,9 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) BuildStorage::Statistics StorageStats; BuildStorageCache::Statistics StorageCacheStats; - const std::filesystem::path ZenFolderPath = - m_ZenFolderPath.empty() ? MakeSafeAbsolutePath(".") / ZenFolderName : MakeSafeAbsolutePath(m_ZenFolderPath); + const std::filesystem::path ZenFolderPath = m_ZenFolderPath.empty() + ? MakeSafeAbsolutePath(std::filesystem::current_path()) / ZenFolderName + : MakeSafeAbsolutePath(m_ZenFolderPath); CreateDirectories(ZenFolderPath); auto _ = MakeGuard([ZenFolderPath]() { if (CleanDirectory(ZenFolderPath, {})) @@ -9828,8 +9833,9 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) BuildStorage::Statistics StorageStats; BuildStorageCache::Statistics StorageCacheStats; - const std::filesystem::path ZenFolderPath = - m_ZenFolderPath.empty() ? MakeSafeAbsolutePath(".") / ZenFolderName : MakeSafeAbsolutePath(m_ZenFolderPath); + const std::filesystem::path ZenFolderPath = m_ZenFolderPath.empty() + ? MakeSafeAbsolutePath(std::filesystem::current_path()) / ZenFolderName + : MakeSafeAbsolutePath(m_ZenFolderPath); CreateDirectories(ZenFolderPath); auto _ = MakeGuard([ZenFolderPath]() { if (CleanDirectory(ZenFolderPath, {})) -- cgit v1.2.3 From 0774de9ac7b6b77d3981eeac86168cd5cfde1522 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Wed, 2 Apr 2025 20:01:56 +0200 Subject: 5.6.2-pre0 --- VERSION.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION.txt b/VERSION.txt index b7c75422b..68cae6d93 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.6.1 +5.6.2-pre0 -- cgit v1.2.3