szaszm commented on code in PR #1311:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1311#discussion_r864908170
##########
extensions/standard-processors/processors/GetFile.cpp:
##########
@@ -232,27 +232,24 @@ std::queue<std::string> GetFile::pollListing(uint64_t
batch_size) {
bool GetFile::fileMatchesRequestCriteria(std::string fullName, std::string
name, const GetFileRequest &request) {
logger_->log_trace("Checking file: %s", fullName);
-#ifdef WIN32
- struct _stat64 statbuf;
- if (_stat64(fullName.c_str(), &statbuf) != 0) {
- return false;
+ std::error_code ec;
+ uint64_t file_size = std::filesystem::file_size(fullName, ec);
+ if (ec) {
+ logger_->log_error("file_size of %s: %s", fullName, ec.message());
Review Comment:
Added in
[2889dd4](https://github.com/apache/nifi-minifi-cpp/pull/1311/commits/2889dd4ae96f7bcad1d5fdf552ad22198729991c).
Sorry for the long turnaround time. And thanks for catching this error.
--
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]