refactor
This commit is contained in:
parent
f1ca91faf1
commit
4aebc2502d
@ -385,7 +385,7 @@ auto encrypt_provider::get_file_list(api_file_list &list,
|
||||
-> api_error {
|
||||
REPERTORY_USES_FUNCTION_NAME();
|
||||
|
||||
const auto cfg = config_.get_encrypt_config();
|
||||
auto cfg = config_.get_encrypt_config();
|
||||
|
||||
try {
|
||||
for (const auto &dir_entry : utils::file::directory{cfg.path}.get_items()) {
|
||||
@ -880,7 +880,7 @@ auto encrypt_provider::read_file_bytes(const std::string &api_path,
|
||||
std::array<unsigned char, crypto_aead_xchacha20poly1305_IETF_NPUBBYTES>>
|
||||
iv_list{};
|
||||
|
||||
const auto cfg = config_.get_encrypt_config();
|
||||
auto cfg = config_.get_encrypt_config();
|
||||
|
||||
unique_recur_mutex_lock reader_lookup_lock(reader_lookup_mtx_);
|
||||
|
||||
@ -933,7 +933,7 @@ auto encrypt_provider::read_file_bytes(const std::string &api_path,
|
||||
info->reader->set_read_position(offset);
|
||||
data.resize(size);
|
||||
|
||||
const auto res =
|
||||
auto res =
|
||||
info->reader->reader_function(reinterpret_cast<char *>(data.data()), 1U,
|
||||
data.size(), info->reader.get());
|
||||
if (res == 0) {
|
||||
@ -1041,7 +1041,7 @@ auto encrypt_provider::start(api_item_added_callback /*api_item_added*/,
|
||||
utils::path::combine(config_.get_data_directory(), {"provider_meta.db"}),
|
||||
sql_create_tables);
|
||||
|
||||
const auto cfg = config_.get_encrypt_config();
|
||||
auto cfg = config_.get_encrypt_config();
|
||||
|
||||
std::string source_path;
|
||||
auto result = utils::db::sqlite::db_select{*db_, file_table}
|
||||
|
Loading…
x
Reference in New Issue
Block a user