updated build system
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good
This commit is contained in:
parent
8feb244dc9
commit
cf6a370eea
@ -121,6 +121,7 @@ auto get_free_drive_space(std::string_view path)
|
||||
});
|
||||
|
||||
return li.QuadPart;
|
||||
}
|
||||
#endif // defined(_WIN32)
|
||||
|
||||
#if defined(__linux__)
|
||||
@ -150,19 +151,17 @@ auto get_free_drive_space(std::string_view path)
|
||||
|
||||
return st.f_bfree * static_cast<std::uint64_t>(st.f_frsize);
|
||||
#endif // defined(__APPLE__)
|
||||
}
|
||||
catch (const std::exception &e) {
|
||||
} catch (const std::exception &e) {
|
||||
utils::error::handle_exception(function_name, e);
|
||||
}
|
||||
catch (...) {
|
||||
} catch (...) {
|
||||
utils::error::handle_exception(function_name);
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto get_free_drive_space(
|
||||
std::wstring_view path) -> std::optional<std::uint64_t> {
|
||||
auto get_free_drive_space(std::wstring_view path)
|
||||
-> std::optional<std::uint64_t> {
|
||||
return get_free_drive_space(utils::string::to_utf8(path));
|
||||
}
|
||||
|
||||
@ -200,12 +199,10 @@ auto get_free_drive_space(std::string_view path)
|
||||
if (res) {
|
||||
ret.accessed =
|
||||
utils::time::windows_file_time_to_unix_time(times.at(1U));
|
||||
ret.created =
|
||||
utils::time::windows_file_time_to_unix_time(times.at(0U));
|
||||
ret.created = utils::time::windows_file_time_to_unix_time(times.at(0U));
|
||||
ret.modified =
|
||||
utils::time::windows_file_time_to_unix_time(times.at(2U));
|
||||
ret.written =
|
||||
utils::time::windows_file_time_to_unix_time(times.at(2U));
|
||||
ret.written = utils::time::windows_file_time_to_unix_time(times.at(2U));
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@ -264,8 +261,8 @@ auto get_free_drive_space(std::string_view path)
|
||||
return get_times(utils::string::to_utf8(path));
|
||||
}
|
||||
|
||||
auto get_total_drive_space(
|
||||
std::string_view path) -> std::optional<std::uint64_t> {
|
||||
auto get_total_drive_space(std::string_view path)
|
||||
-> std::optional<std::uint64_t> {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
try {
|
||||
@ -320,13 +317,12 @@ auto get_free_drive_space(std::string_view path)
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto get_total_drive_space(
|
||||
std::wstring_view path) -> std::optional<std::uint64_t> {
|
||||
auto get_total_drive_space(std::wstring_view path)
|
||||
-> std::optional<std::uint64_t> {
|
||||
return get_total_drive_space(utils::string::to_utf8(path));
|
||||
}
|
||||
|
||||
auto i_fs_item::get_time(time_type type)
|
||||
const -> std::optional<std::uint64_t> {
|
||||
auto i_fs_item::get_time(time_type type) const -> std::optional<std::uint64_t> {
|
||||
return utils::file::get_time(get_path(), type);
|
||||
}
|
||||
|
||||
@ -442,8 +438,7 @@ auto get_free_drive_space(std::string_view path)
|
||||
|
||||
data_buffer encrypted_data{};
|
||||
utils::encryption::encrypt_data(
|
||||
*password,
|
||||
reinterpret_cast<const unsigned char *>(str_data.c_str()),
|
||||
*password, reinterpret_cast<const unsigned char *>(str_data.c_str()),
|
||||
str_data.size(), encrypted_data);
|
||||
return file->write(encrypted_data, 0U);
|
||||
}
|
||||
@ -622,8 +617,7 @@ auto get_free_drive_space(std::string_view path)
|
||||
});
|
||||
}
|
||||
|
||||
auto parts =
|
||||
repertory::utils::string::split(smb_path.substr(2U), '/', false);
|
||||
auto parts = repertory::utils::string::split(smb_path.substr(2U), '/', false);
|
||||
if (parts.size() > 2U) {
|
||||
parts.erase(std::prev(parts.end()), parts.end());
|
||||
}
|
||||
@ -651,8 +645,7 @@ auto get_free_drive_space(std::string_view path)
|
||||
});
|
||||
}
|
||||
|
||||
auto parts =
|
||||
repertory::utils::string::split(smb_path.substr(2U), '/', false);
|
||||
auto parts = repertory::utils::string::split(smb_path.substr(2U), '/', false);
|
||||
if (parts.size() > 2U) {
|
||||
parts.erase(std::next(parts.begin(), 2U), parts.end());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user