From 96ac72ae21ffd4a48b3de3fe64ddea4bd2d6c964 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Thu, 2 Jan 2025 17:39:48 -0600 Subject: [PATCH] fix comment --- .../providers/encrypt/encrypt_provider.cpp | 51 ++++++++----------- 1 file changed, 22 insertions(+), 29 deletions(-) diff --git a/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp b/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp index 4f85375e..c846ce63 100644 --- a/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp +++ b/repertory/librepertory/src/providers/encrypt/encrypt_provider.cpp @@ -39,10 +39,9 @@ namespace repertory { encrypt_provider::encrypt_provider(app_config &config) : config_(config), encrypt_config_(config.get_encrypt_config()) {} -auto encrypt_provider::create_api_file(const std::string &api_path, - bool directory, - const std::string &source_path) - -> api_file { +auto encrypt_provider::create_api_file( + const std::string &api_path, bool directory, + const std::string &source_path) -> api_file { auto times{utils::file::get_times(source_path)}; if (not times.has_value()) { throw std::runtime_error("failed to get file times"); @@ -68,10 +67,10 @@ auto encrypt_provider::create_api_file(const std::string &api_path, void encrypt_provider::create_item_meta(api_meta_map &meta, bool directory, const api_file &file) { #if defined(_WIN32) - struct _stat64 buf{}; + struct _stat64 buf {}; _stat64(file.source_path.c_str(), &buf); #else // !defined(_WIN32) - struct stat buf{}; + struct stat buf {}; stat(file.source_path.c_str(), &buf); #endif // defined(_WIN32) @@ -151,9 +150,8 @@ auto encrypt_provider::do_fs_operation( return callback(cfg, source_path); } -auto encrypt_provider::get_api_path_from_source(const std::string &source_path, - std::string &api_path) const - -> api_error { +auto encrypt_provider::get_api_path_from_source( + const std::string &source_path, std::string &api_path) const -> api_error { REPERTORY_USES_FUNCTION_NAME(); try { @@ -193,9 +191,8 @@ auto encrypt_provider::get_directory_item_count( return count; } -auto encrypt_provider::get_directory_items(const std::string &api_path, - directory_item_list &list) const - -> api_error { +auto encrypt_provider::get_directory_items( + const std::string &api_path, directory_item_list &list) const -> api_error { REPERTORY_USES_FUNCTION_NAME(); return do_fs_operation( @@ -328,9 +325,8 @@ auto encrypt_provider::get_file(const std::string &api_path, return api_error::error; } -auto encrypt_provider::get_file_list(api_file_list &list, - std::string & /* marker */) const - -> api_error { +auto encrypt_provider::get_file_list( + api_file_list &list, std::string & /* marker */) const -> api_error { REPERTORY_USES_FUNCTION_NAME(); const auto &cfg{get_encrypt_config()}; @@ -353,9 +349,8 @@ auto encrypt_provider::get_file_list(api_file_list &list, return api_error::error; } -auto encrypt_provider::get_file_size(const std::string &api_path, - std::uint64_t &file_size) const - -> api_error { +auto encrypt_provider::get_file_size( + const std::string &api_path, std::uint64_t &file_size) const -> api_error { REPERTORY_USES_FUNCTION_NAME(); try { @@ -376,10 +371,9 @@ auto encrypt_provider::get_file_size(const std::string &api_path, return api_error::error; } -auto encrypt_provider::get_filesystem_item(const std::string &api_path, - bool directory, - filesystem_item &fsi) const - -> api_error { +auto encrypt_provider::get_filesystem_item( + const std::string &api_path, bool directory, + filesystem_item &fsi) const -> api_error { std::string source_path; if (directory) { auto result{db_->get_directory_source_path(api_path, source_path)}; @@ -430,10 +424,9 @@ auto encrypt_provider::get_filesystem_item_from_source_path( return get_filesystem_item(api_path, false, fsi); } -auto encrypt_provider::get_filesystem_item_and_file(const std::string &api_path, - api_file &file, - filesystem_item &fsi) const - -> api_error { +auto encrypt_provider::get_filesystem_item_and_file( + const std::string &api_path, api_file &file, + filesystem_item &fsi) const -> api_error { REPERTORY_USES_FUNCTION_NAME(); try { @@ -559,8 +552,8 @@ auto encrypt_provider::is_directory(const std::string &api_path, return api_error::error; } -auto encrypt_provider::is_file(const std::string &api_path, bool &exists) const - -> api_error { +auto encrypt_provider::is_file(const std::string &api_path, + bool &exists) const -> api_error { REPERTORY_USES_FUNCTION_NAME(); try { @@ -875,7 +868,7 @@ auto encrypt_provider::start(api_item_added_callback /*api_item_added*/, #if defined(_WIN32) if (utils::string::to_lower(cur_path) != utils::string::to_lower(cfg_path)) { -#else //! defined(_WIN32) +#else // !defined(_WIN32) if (cur_path != cfg_path) { #endif // defined(_WIN32) throw startup_exception(fmt::format(