aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-02-20 09:07:00 +0100
committerGitHub Enterprise <[email protected]>2026-02-20 09:07:00 +0100
commit5789739f042791d38f0d7f4219e5b0b823d8b3d6 (patch)
treefad9a5a806e4167e25f2049e2bd19ed1129213bd
parentGC - fix handling of attachment ranges, http access token expiration, lock fi... (diff)
downloadzen-5789739f042791d38f0d7f4219e5b0b823d8b3d6.tar.xz
zen-5789739f042791d38f0d7f4219e5b0b823d8b3d6.zip
fix MakeSafeAbsolutePathInPlace mis-spelling (#765)
(was MakeSafeAbsolutePathÍnPlace - note accent) Also fixed misleading comments on multiple functions in filesystem.h
-rw-r--r--src/zen/authutils.cpp2
-rw-r--r--src/zen/cmds/builds_cmd.cpp44
-rw-r--r--src/zen/cmds/print_cmd.cpp4
-rw-r--r--src/zen/cmds/projectstore_cmd.cpp2
-rw-r--r--src/zen/cmds/wipe_cmd.cpp2
-rw-r--r--src/zen/cmds/workspaces_cmd.cpp2
-rw-r--r--src/zencore/filesystem.cpp4
-rw-r--r--src/zencore/include/zencore/filesystem.h38
8 files changed, 49 insertions, 49 deletions
diff --git a/src/zen/authutils.cpp b/src/zen/authutils.cpp
index 31db82efd..16427acf5 100644
--- a/src/zen/authutils.cpp
+++ b/src/zen/authutils.cpp
@@ -233,7 +233,7 @@ AuthCommandLineOptions::ParseOptions(cxxopts::Options& Ops,
}
else if (!m_AccessTokenPath.empty())
{
- MakeSafeAbsolutePathÍnPlace(m_AccessTokenPath);
+ MakeSafeAbsolutePathInPlace(m_AccessTokenPath);
std::string ResolvedAccessToken = ReadAccessTokenFromJsonFile(m_AccessTokenPath);
if (!ResolvedAccessToken.empty())
{
diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp
index 59b209384..8dfe1093f 100644
--- a/src/zen/cmds/builds_cmd.cpp
+++ b/src/zen/cmds/builds_cmd.cpp
@@ -2680,7 +2680,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_SystemRootDir = PickDefaultSystemRootDirectory();
}
- MakeSafeAbsolutePathÍnPlace(m_SystemRootDir);
+ MakeSafeAbsolutePathInPlace(m_SystemRootDir);
};
ParseSystemOptions();
@@ -2729,7 +2729,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
throw OptionParseException("'--host', '--url', '--override-host' or '--storage-path' is required", SubOption->help());
}
- MakeSafeAbsolutePathÍnPlace(m_StoragePath);
+ MakeSafeAbsolutePathInPlace(m_StoragePath);
};
auto ParseOutputOptions = [&]() {
@@ -2947,7 +2947,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
throw OptionParseException("'--local-path' is required", SubOption->help());
}
- MakeSafeAbsolutePathÍnPlace(m_Path);
+ MakeSafeAbsolutePathInPlace(m_Path);
};
auto ParseFileFilters = [&](std::vector<std::string>& OutIncludeWildcards, std::vector<std::string>& OutExcludeWildcards) {
@@ -3004,7 +3004,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
throw OptionParseException("'--compare-path' is required", SubOption->help());
}
- MakeSafeAbsolutePathÍnPlace(m_DiffPath);
+ MakeSafeAbsolutePathInPlace(m_DiffPath);
};
auto ParseBlobHash = [&]() -> IoHash {
@@ -3105,7 +3105,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
if (!m_BuildMetadataPath.empty())
{
- MakeSafeAbsolutePathÍnPlace(m_BuildMetadataPath);
+ MakeSafeAbsolutePathInPlace(m_BuildMetadataPath);
IoBuffer MetaDataJson = ReadFile(m_BuildMetadataPath).Flatten();
std::string_view Json(reinterpret_cast<const char*>(MetaDataJson.GetData()), MetaDataJson.GetSize());
std::string JsonError;
@@ -3202,8 +3202,8 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
if (SubOption == &m_ListOptions)
{
- MakeSafeAbsolutePathÍnPlace(m_ListQueryPath);
- MakeSafeAbsolutePathÍnPlace(m_ListResultPath);
+ MakeSafeAbsolutePathInPlace(m_ListQueryPath);
+ MakeSafeAbsolutePathInPlace(m_ListResultPath);
if (!m_ListResultPath.empty())
{
@@ -3255,7 +3255,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = std::filesystem::current_path() / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
CreateDirectories(m_ZenFolderPath);
auto _ = MakeGuard([this]() { CleanAndRemoveDirectory(GetSmallWorkerPool(EWorkloadType::Burst), m_ZenFolderPath); });
@@ -3294,7 +3294,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
if (SubOption == &m_ListBlocksOptions)
{
- MakeSafeAbsolutePathÍnPlace(m_ListResultPath);
+ MakeSafeAbsolutePathInPlace(m_ListResultPath);
if (!m_ListResultPath.empty())
{
@@ -3316,7 +3316,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = std::filesystem::current_path() / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
CreateDirectories(m_ZenFolderPath);
auto _ = MakeGuard([this]() { CleanAndRemoveDirectory(GetSmallWorkerPool(EWorkloadType::Burst), m_ZenFolderPath); });
@@ -3387,8 +3387,8 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = std::filesystem::current_path() / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
- MakeSafeAbsolutePathÍnPlace(m_ChunkingCachePath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ChunkingCachePath);
CreateDirectories(m_ZenFolderPath);
auto _ = MakeGuard([this, &Workers]() { CleanAndRemoveDirectory(Workers.GetIOWorkerPool(), m_ZenFolderPath); });
@@ -3532,7 +3532,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = m_Path / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
BuildStorageBase::Statistics StorageStats;
BuildStorageCache::Statistics StorageCacheStats;
@@ -3632,7 +3632,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = m_Path / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
BuildStorageBase::Statistics StorageStats;
BuildStorageCache::Statistics StorageCacheStats;
@@ -3652,7 +3652,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
std::unique_ptr<CbObjectWriter> StructuredOutput;
if (!m_LsResultPath.empty())
{
- MakeSafeAbsolutePathÍnPlace(m_LsResultPath);
+ MakeSafeAbsolutePathInPlace(m_LsResultPath);
StructuredOutput = std::make_unique<CbObjectWriter>();
}
@@ -3696,7 +3696,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
ParsePath();
ParseDiffPath();
- MakeSafeAbsolutePathÍnPlace(m_ChunkingCachePath);
+ MakeSafeAbsolutePathInPlace(m_ChunkingCachePath);
std::vector<std::string> ExcludeFolders = DefaultExcludeFolders;
std::vector<std::string> ExcludeExtensions = DefaultExcludeExtensions;
@@ -3745,7 +3745,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = std::filesystem::current_path() / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
CreateDirectories(m_ZenFolderPath);
auto _ = MakeGuard([this, &Workers]() { CleanAndRemoveDirectory(Workers.GetIOWorkerPool(), m_ZenFolderPath); });
@@ -3828,7 +3828,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = std::filesystem::current_path() / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
CreateDirectories(m_ZenFolderPath);
auto _ = MakeGuard([this, &Workers]() { CleanAndRemoveDirectory(Workers.GetIOWorkerPool(), m_ZenFolderPath); });
@@ -3883,7 +3883,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = std::filesystem::current_path() / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
CreateDirectories(m_ZenFolderPath);
auto _ = MakeGuard([this, &Workers]() { CleanAndRemoveDirectory(Workers.GetIOWorkerPool(), m_ZenFolderPath); });
@@ -3933,7 +3933,7 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = m_Path / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
EPartialBlockRequestMode PartialBlockRequestMode = ParseAllowPartialBlockRequests();
@@ -4083,8 +4083,8 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
m_ZenFolderPath = m_Path / ZenFolderName;
}
- MakeSafeAbsolutePathÍnPlace(m_ZenFolderPath);
- MakeSafeAbsolutePathÍnPlace(m_ChunkingCachePath);
+ MakeSafeAbsolutePathInPlace(m_ZenFolderPath);
+ MakeSafeAbsolutePathInPlace(m_ChunkingCachePath);
StorageInstance Storage = CreateBuildStorage(StorageStats,
StorageCacheStats,
diff --git a/src/zen/cmds/print_cmd.cpp b/src/zen/cmds/print_cmd.cpp
index 030cc8b66..c6b250fdf 100644
--- a/src/zen/cmds/print_cmd.cpp
+++ b/src/zen/cmds/print_cmd.cpp
@@ -84,7 +84,7 @@ PrintCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
}
else
{
- MakeSafeAbsolutePathÍnPlace(m_Filename);
+ MakeSafeAbsolutePathInPlace(m_Filename);
Fc = ReadFile(m_Filename);
}
@@ -244,7 +244,7 @@ PrintPackageCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** ar
if (m_Filename.empty())
throw OptionParseException("'--source' is required", m_Options.help());
- MakeSafeAbsolutePathÍnPlace(m_Filename);
+ MakeSafeAbsolutePathInPlace(m_Filename);
FileContents Fc = ReadFile(m_Filename);
IoBuffer Data = Fc.Flatten();
CbPackage Package;
diff --git a/src/zen/cmds/projectstore_cmd.cpp b/src/zen/cmds/projectstore_cmd.cpp
index 4885fd363..4de6ad25c 100644
--- a/src/zen/cmds/projectstore_cmd.cpp
+++ b/src/zen/cmds/projectstore_cmd.cpp
@@ -2430,7 +2430,7 @@ OplogDownloadCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** a
{
m_SystemRootDir = PickDefaultSystemRootDirectory();
}
- MakeSafeAbsolutePathÍnPlace(m_SystemRootDir);
+ MakeSafeAbsolutePathInPlace(m_SystemRootDir);
};
ParseSystemOptions();
diff --git a/src/zen/cmds/wipe_cmd.cpp b/src/zen/cmds/wipe_cmd.cpp
index adf0e61f0..a5029e1c5 100644
--- a/src/zen/cmds/wipe_cmd.cpp
+++ b/src/zen/cmds/wipe_cmd.cpp
@@ -549,7 +549,7 @@ WipeCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
ProgressMode = (IsVerbose || m_PlainProgress) ? ProgressBar::Mode::Plain : ProgressBar::Mode::Pretty;
BoostWorkerThreads = m_BoostWorkerThreads;
- MakeSafeAbsolutePathÍnPlace(m_Directory);
+ MakeSafeAbsolutePathInPlace(m_Directory);
if (!IsDir(m_Directory))
{
diff --git a/src/zen/cmds/workspaces_cmd.cpp b/src/zen/cmds/workspaces_cmd.cpp
index 6e6f5d863..2661ac9da 100644
--- a/src/zen/cmds/workspaces_cmd.cpp
+++ b/src/zen/cmds/workspaces_cmd.cpp
@@ -398,7 +398,7 @@ WorkspaceShareCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char**
}
else
{
- MakeSafeAbsolutePathÍnPlace(m_SystemRootDir);
+ MakeSafeAbsolutePathInPlace(m_SystemRootDir);
}
std::filesystem::path StatePath = m_SystemRootDir / "workspaces";
diff --git a/src/zencore/filesystem.cpp b/src/zencore/filesystem.cpp
index 92a065707..1a4ee4b9b 100644
--- a/src/zencore/filesystem.cpp
+++ b/src/zencore/filesystem.cpp
@@ -3069,7 +3069,7 @@ SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly)
}
void
-MakeSafeAbsolutePathÍnPlace(std::filesystem::path& Path)
+MakeSafeAbsolutePathInPlace(std::filesystem::path& Path)
{
if (!Path.empty())
{
@@ -3091,7 +3091,7 @@ std::filesystem::path
MakeSafeAbsolutePath(const std::filesystem::path& Path)
{
std::filesystem::path Tmp(Path);
- MakeSafeAbsolutePathÍnPlace(Tmp);
+ MakeSafeAbsolutePathInPlace(Tmp);
return Tmp;
}
diff --git a/src/zencore/include/zencore/filesystem.h b/src/zencore/include/zencore/filesystem.h
index f28863679..16e2b59f8 100644
--- a/src/zencore/include/zencore/filesystem.h
+++ b/src/zencore/include/zencore/filesystem.h
@@ -64,80 +64,80 @@ std::filesystem::path PathFromHandle(void* NativeHandle, std::error_code& Ec);
*/
std::filesystem::path CanonicalPath(std::filesystem::path InPath, std::error_code& Ec);
-/** Query file size
+/** Check if a path exists and is a regular file (throws)
*/
bool IsFile(const std::filesystem::path& Path);
-/** Query file size
+/** Check if a path exists and is a regular file (does not throw)
*/
bool IsFile(const std::filesystem::path& Path, std::error_code& Ec);
-/** Query file size
+/** Check if a path exists and is a directory (throws)
*/
bool IsDir(const std::filesystem::path& Path);
-/** Query file size
+/** Check if a path exists and is a directory (does not throw)
*/
bool IsDir(const std::filesystem::path& Path, std::error_code& Ec);
-/** Query file size
+/** Delete file at path, if it exists (throws)
*/
bool RemoveFile(const std::filesystem::path& Path);
-/** Query file size
+/** Delete file at path, if it exists (does not throw)
*/
bool RemoveFile(const std::filesystem::path& Path, std::error_code& Ec);
-/** Query file size
+/** Delete directory at path, if it exists (throws)
*/
bool RemoveDir(const std::filesystem::path& Path);
-/** Query file size
+/** Delete directory at path, if it exists (does not throw)
*/
bool RemoveDir(const std::filesystem::path& Path, std::error_code& Ec);
-/** Query file size
+/** Query file size (throws)
*/
uint64_t FileSizeFromPath(const std::filesystem::path& Path);
-/** Query file size
+/** Query file size (does not throw)
*/
uint64_t FileSizeFromPath(const std::filesystem::path& Path, std::error_code& Ec);
-/** Query file size from native file handle
+/** Query file size from native file handle (throws)
*/
uint64_t FileSizeFromHandle(void* NativeHandle);
-/** Query file size from native file handle
+/** Query file size from native file handle (does not throw)
*/
uint64_t FileSizeFromHandle(void* NativeHandle, std::error_code& Ec);
/** Get a native time tick of last modification time
*/
-uint64_t GetModificationTickFromHandle(void* NativeHandle, std::error_code& Ec);
+uint64_t GetModificationTickFromPath(const std::filesystem::path& Filename);
/** Get a native time tick of last modification time
*/
-uint64_t GetModificationTickFromPath(const std::filesystem::path& Filename);
+uint64_t GetModificationTickFromHandle(void* NativeHandle, std::error_code& Ec);
bool TryGetFileProperties(const std::filesystem::path& Path,
uint64_t& OutSize,
uint64_t& OutModificationTick,
uint32_t& OutNativeModeOrAttributes);
-/** Move a file, if the files are not on the same drive the function will fail
+/** Move/rename a file, if the files are not on the same drive the function will fail (throws)
*/
void RenameFile(const std::filesystem::path& SourcePath, const std::filesystem::path& TargetPath);
-/** Move a file, if the files are not on the same drive the function will fail
+/** Move/rename a file, if the files are not on the same drive the function will fail
*/
void RenameFile(const std::filesystem::path& SourcePath, const std::filesystem::path& TargetPath, std::error_code& Ec);
-/** Move a directory, if the files are not on the same drive the function will fail
+/** Move/rename a directory, if the files are not on the same drive the function will fail (throws)
*/
void RenameDirectory(const std::filesystem::path& SourcePath, const std::filesystem::path& TargetPath);
-/** Move a directory, if the files are not on the same drive the function will fail
+/** Move/rename a directory, if the files are not on the same drive the function will fail
*/
void RenameDirectory(const std::filesystem::path& SourcePath, const std::filesystem::path& TargetPath, std::error_code& Ec);
@@ -421,7 +421,7 @@ uint32_t MakeFileModeReadOnly(uint32_t FileMode, bool ReadOnly);
bool SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly, std::error_code& Ec);
bool SetFileReadOnly(const std::filesystem::path& Filename, bool ReadOnly);
-void MakeSafeAbsolutePathÍnPlace(std::filesystem::path& Path);
+void MakeSafeAbsolutePathInPlace(std::filesystem::path& Path);
[[nodiscard]] std::filesystem::path MakeSafeAbsolutePath(const std::filesystem::path& Path);
class SharedMemory