updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit

This commit is contained in:
Scott E. Graves 2024-10-17 16:34:32 -05:00
parent f0fe0a1962
commit cd538566d3
4 changed files with 13 additions and 10 deletions

View File

@ -31,7 +31,11 @@ using db_types_t = std::variant<std::int64_t, std::string>;
struct sqlite3_deleter { struct sqlite3_deleter {
void operator()(sqlite3 *db3) const { void operator()(sqlite3 *db3) const {
if (db3 != nullptr) { if (db3 != nullptr) {
#if defined(_WIN32)
sqlite3_close(db3); sqlite3_close(db3);
#else // !defined(_WIN32)
sqlite3_close_v2(db3);
#endif // defined(_WIN32)
} }
} }
}; };

View File

@ -169,7 +169,6 @@ auto directory::create_directory(std::string_view path) const
std::string current_path; std::string current_path;
for (std::size_t idx = 0U; for (std::size_t idx = 0U;
!is_stop_requested() && ret && (idx < paths.size()); ++idx) { !is_stop_requested() && ret && (idx < paths.size()); ++idx) {
if (paths.at(idx).empty()) { if (paths.at(idx).empty()) {
current_path = utils::path::directory_seperator; current_path = utils::path::directory_seperator;
continue; continue;

View File

@ -569,11 +569,11 @@ auto smb_directory::remove() -> bool {
throw std::runtime_error("session not found|" + path_); throw std::runtime_error("session not found|" + path_);
} }
return utils::retry_action([this]() -> bool {
if (not exists()) { if (not exists()) {
return true; return true;
} }
return utils::retry_action([this]() -> bool {
try { try {
auto res = smb_directory_rm(session_.get(), tid_, auto res = smb_directory_rm(session_.get(), tid_,
smb_create_relative_path(path_).c_str()); smb_create_relative_path(path_).c_str());

View File

@ -304,13 +304,13 @@ auto smb_file::remove() -> bool {
REPERTORY_USES_FUNCTION_NAME(); REPERTORY_USES_FUNCTION_NAME();
try { try {
close();
return utils::retry_action([this]() -> bool {
if (not exists()) { if (not exists()) {
return true; return true;
} }
close();
return utils::retry_action([this]() -> bool {
try { try {
auto res = smb_tree_connect(session_.get(), share_name_.c_str(), &tid_); auto res = smb_tree_connect(session_.get(), share_name_.c_str(), &tid_);
if (res != DSM_SUCCESS) { if (res != DSM_SUCCESS) {