adam-markovics commented on code in PR #1352:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1352#discussion_r901664241
##########
extensions/sftp/processors/ListSFTP.cpp:
##########
@@ -323,8 +323,8 @@ bool ListSFTP::createAndTransferFlowFileFromChild(
logger_->log_error("Modification date %lu of \"%s/%s\" larger than int64_t
max", child.attrs.mtime, child.parent_path.c_str(), child.filename.c_str());
return true;
}
- std::string mtime_str;
- if
(!utils::timeutils::getDateTimeStr(gsl::narrow<int64_t>(child.attrs.mtime),
mtime_str)) {
+ auto mtime_str =
utils::timeutils::getDateTimeStr(date::sys_seconds{std::chrono::seconds(child.attrs.mtime)});
+ if (!mtime_str) {
logger_->log_error("Failed to convert modification date %lu of \"%s/%s\"
to string", child.attrs.mtime, child.parent_path.c_str(),
child.filename.c_str());
return true;
Review Comment:
Why return true in an error case? Also at line 324.
--
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]