updated build system
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
Some checks failed
BlockStorage/repertory/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f0fe0a1962
commit
cd538566d3
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -161,7 +161,7 @@ auto directory::create_directory(std::string_view path) const
|
|||||||
std::string{abs_path} + '|' +
|
std::string{abs_path} + '|' +
|
||||||
std::to_string(res));
|
std::to_string(res));
|
||||||
}
|
}
|
||||||
#else // !defined(_WIN32)
|
#else // !defined(_WIN32)
|
||||||
auto ret{true};
|
auto ret{true};
|
||||||
auto paths =
|
auto paths =
|
||||||
utils::string::split(abs_path, utils::path::directory_seperator, false);
|
utils::string::split(abs_path, utils::path::directory_seperator, false);
|
||||||
@ -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;
|
||||||
|
@ -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_);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (not exists()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return utils::retry_action([this]() -> bool {
|
return utils::retry_action([this]() -> bool {
|
||||||
|
if (not exists()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
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());
|
||||||
|
@ -304,13 +304,13 @@ auto smb_file::remove() -> bool {
|
|||||||
REPERTORY_USES_FUNCTION_NAME();
|
REPERTORY_USES_FUNCTION_NAME();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (not exists()) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
close();
|
close();
|
||||||
|
|
||||||
return utils::retry_action([this]() -> bool {
|
return utils::retry_action([this]() -> bool {
|
||||||
|
if (not exists()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user