diff options
| author | Dan Engelbrecht <[email protected]> | 2025-10-14 13:13:59 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-10-14 13:13:59 +0200 |
| commit | 9b7580230798d83d9bb36d40150913af69a13929 (patch) | |
| tree | 73552ec1d3e9d955ce391cad894c637b74be91d4 /src/zenutil | |
| parent | move all storage-related services into storage tree (#571) (diff) | |
| download | zen-9b7580230798d83d9bb36d40150913af69a13929.tar.xz zen-9b7580230798d83d9bb36d40150913af69a13929.zip | |
refactor builds cmd part2 (#572)
* fix metadata info in filebuildstorage GetBuild
* move MakeSafeAbsolutePathÃnPlace to filesystem.h/cpp
* add BuildsOperationUploadFolder op moving code from builds_cmd.cpp
Diffstat (limited to 'src/zenutil')
| -rw-r--r-- | src/zenutil/commandlineoptions.cpp | 27 | ||||
| -rw-r--r-- | src/zenutil/include/zenutil/commandlineoptions.h | 10 |
2 files changed, 4 insertions, 33 deletions
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<std::string>& 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) { diff --git a/src/zenutil/include/zenutil/commandlineoptions.h b/src/zenutil/include/zenutil/commandlineoptions.h index f927d41e5..d6a171242 100644 --- a/src/zenutil/include/zenutil/commandlineoptions.h +++ b/src/zenutil/include/zenutil/commandlineoptions.h @@ -17,12 +17,10 @@ ZEN_THIRD_PARTY_INCLUDES_END namespace zen { -std::vector<std::string> ParseCommandLine(std::string_view CommandLine); -std::vector<char*> StripCommandlineQuotes(std::vector<std::string>& InOutArgs); -void MakeSafeAbsolutePathÍnPlace(std::filesystem::path& Path); -[[nodiscard]] std::filesystem::path MakeSafeAbsolutePath(const std::filesystem::path& Path); -std::filesystem::path StringToPath(const std::string_view& Path); -std::string_view RemoveQuotes(const std::string_view& Arg); +std::vector<std::string> ParseCommandLine(std::string_view CommandLine); +std::vector<char*> StripCommandlineQuotes(std::vector<std::string>& InOutArgs); +std::filesystem::path StringToPath(const std::string_view& Path); +std::string_view RemoveQuotes(const std::string_view& Arg); void commandlineoptions_forcelink(); // internal |