From 9b7580230798d83d9bb36d40150913af69a13929 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Tue, 14 Oct 2025 13:13:59 +0200 Subject: refactor builds cmd part2 (#572) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix metadata info in filebuildstorage GetBuild * move MakeSafeAbsolutePathÍnPlace to filesystem.h/cpp * add BuildsOperationUploadFolder op moving code from builds_cmd.cpp --- src/zenutil/commandlineoptions.cpp | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/zenutil/commandlineoptions.cpp') diff --git a/src/zenutil/commandlineoptions.cpp b/src/zenutil/commandlineoptions.cpp index 040726c77..5db6d8c04 100644 --- a/src/zenutil/commandlineoptions.cpp +++ b/src/zenutil/commandlineoptions.cpp @@ -132,33 +132,6 @@ StripCommandlineQuotes(std::vector& InOutArgs) return RawArgs; } -void -MakeSafeAbsolutePathÍnPlace(std::filesystem::path& Path) -{ - if (!Path.empty()) - { - std::filesystem::path AbsolutePath = std::filesystem::absolute(Path).make_preferred(); -#if ZEN_PLATFORM_WINDOWS - const std::string_view Prefix = "\\\\?\\"; - const std::u8string PrefixU8(Prefix.begin(), Prefix.end()); - std::u8string PathString = AbsolutePath.u8string(); - if (!PathString.empty() && !PathString.starts_with(PrefixU8)) - { - PathString.insert(0, PrefixU8); - Path = PathString; - } -#endif // ZEN_PLATFORM_WINDOWS - } -} - -std::filesystem::path -MakeSafeAbsolutePath(const std::filesystem::path& Path) -{ - std::filesystem::path Tmp(Path); - MakeSafeAbsolutePathÍnPlace(Tmp); - return Tmp; -} - std::filesystem::path StringToPath(const std::string_view& Path) { -- cgit v1.2.3