file db unit tests and fixes
This commit is contained in:
parent
8c8d7b3bf9
commit
c9ac60a2fc
@ -533,8 +533,14 @@ auto encrypt_provider::is_directory(const std::string &api_path,
|
|||||||
try {
|
try {
|
||||||
std::string source_path;
|
std::string source_path;
|
||||||
auto result = db_->get_directory_source_path(api_path, source_path);
|
auto result = db_->get_directory_source_path(api_path, source_path);
|
||||||
|
|
||||||
if (result != api_error::success) {
|
if (result != api_error::success) {
|
||||||
return result;
|
if (result != api_error::directory_not_found) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
exists = false;
|
||||||
|
return api_error::success;
|
||||||
}
|
}
|
||||||
|
|
||||||
exists = utils::file::directory{source_path}.exists();
|
exists = utils::file::directory{source_path}.exists();
|
||||||
@ -555,7 +561,12 @@ auto encrypt_provider::is_file(const std::string &api_path, bool &exists) const
|
|||||||
std::string source_path;
|
std::string source_path;
|
||||||
auto result = db_->get_file_source_path(api_path, source_path);
|
auto result = db_->get_file_source_path(api_path, source_path);
|
||||||
if (result != api_error::success) {
|
if (result != api_error::success) {
|
||||||
return result;
|
if (result != api_error::item_not_found) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
exists = false;
|
||||||
|
return api_error::success;
|
||||||
}
|
}
|
||||||
|
|
||||||
exists = utils::file::file{source_path}.exists();
|
exists = utils::file::file{source_path}.exists();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user