adamdebreceni commented on code in PR #2088:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2088#discussion_r2732118304
##########
libminifi/src/c2/protocols/RESTSender.cpp:
##########
@@ -76,6 +76,7 @@ void
RESTSender::initialize(core::controller::ControllerServiceProvider* control
req_encoding_ = RequestEncoding::none;
}
}
+ asset_download_timeout_ =
(configure->get(Configuration::nifi_c2_asset_download_timeout) |
utils::andThen([] (const auto& s) { return parsing::parseDuration(s) |
utils::toOptional(); })).value_or(0s);
Review Comment:
done
##########
libminifi/src/utils/file/AssetManager.cpp:
##########
@@ -156,9 +156,9 @@ nonstd::expected<void, std::string> AssetManager::sync(
}
}
- for (auto& [path, content] : new_file_contents) {
- create_dir((root_ / path).parent_path());
- std::ofstream{root_ / path, std::ios::binary}.write(reinterpret_cast<const
char*>(content.data()), gsl::narrow<std::streamsize>(content.size()));
+ for (auto& path : new_file_paths) {
+ create_dir(path.parent_path());
+ std::filesystem::rename(path.string() + ".part", path);
Review Comment:
done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]