updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
2024-10-20 12:01:23 -05:00
parent 104e101158
commit 1f6036ec18
17 changed files with 696 additions and 705 deletions

View File

@@ -46,12 +46,13 @@ auto traverse_directory(
auto search = repertory::utils::path::combine(path, {"*.*"});
auto find = ::FindFirstFileA(search.c_str(), &fd);
if (find == INVALID_HANDLE_VALUE) {
throw repertory::utils::error::create_exception({
throw repertory::utils::error::create_exception(
function_name,
"failed to open directory",
std::to_string(repertory::utils::get_last_error_code()),
path,
});
{
"failed to open directory",
std::to_string(repertory::utils::get_last_error_code()),
path,
});
}
do {
@@ -73,12 +74,13 @@ auto traverse_directory(
#else // !defined(_WIN32)
auto *root = opendir(std::string{path}.c_str());
if (root == nullptr) {
throw repertory::utils::error::create_exception({
throw repertory::utils::error::create_exception(
function_name,
"failed to open directory",
std::to_string(repertory::utils::get_last_error_code()),
path,
});
{
"failed to open directory",
std::to_string(repertory::utils::get_last_error_code()),
path,
});
}
struct dirent *de{nullptr};
@@ -108,14 +110,14 @@ auto directory::copy_to(std::string_view new_path,
REPERTORY_USES_FUNCTION_NAME();
try {
throw utils::error::create_exception({
function_name,
"failed to copy directory",
"not implemented",
utils::string::from_bool(overwrite),
new_path,
path_,
});
throw utils::error::create_exception(
function_name, {
"failed to copy directory",
"not implemented",
utils::string::from_bool(overwrite),
new_path,
path_,
});
} catch (const std::exception &e) {
utils::error::handle_exception(function_name, e);
} catch (...) {
@@ -171,12 +173,12 @@ auto directory::create_directory(std::string_view path) const
auto res = ::SHCreateDirectory(nullptr,
utils::string::from_utf8(abs_path).c_str());
if (res != ERROR_SUCCESS) {
throw utils::error::create_exception({
function_name,
"failed to create directory",
std::to_string(res),
abs_path,
});
throw utils::error::create_exception(function_name,
{
"failed to create directory",
std::to_string(res),
abs_path,
});
}
#else // !defined(_WIN32)
auto ret{true};
@@ -377,13 +379,13 @@ auto directory::move_to(std::string_view new_path) -> bool {
REPERTORY_USES_FUNCTION_NAME();
try {
throw utils::error::create_exception({
function_name,
"failed to move directory",
"not implemented",
new_path,
path_,
});
throw utils::error::create_exception(function_name,
{
"failed to move directory",
"not implemented",
new_path,
path_,
});
} catch (const std::exception &e) {
utils::error::handle_exception(function_name, e);
} catch (...) {