You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/20 15:22:20 UTC

[GitHub] [nifi-minifi-cpp] martinzink commented on a diff in pull request #1311: MINIFICPP-1807 improve stat() error logging

martinzink commented on code in PR #1311:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1311#discussion_r854268870


##########
extensions/standard-processors/processors/GetFile.cpp:
##########
@@ -234,15 +235,15 @@ bool GetFile::fileMatchesRequestCriteria(std::string fullName, std::string name,
 
 #ifdef WIN32
   struct _stat64 statbuf;
-  if (_stat64(fullName.c_str(), &statbuf) != 0) {
-    return false;
-  }
+  const auto stat_result = _stat64(fullName.c_str(), &statbuf);

Review Comment:
   Couldnt we use https://en.cppreference.com/w/cpp/filesystem/file_size and https://en.cppreference.com/w/cpp/filesystem/last_write_time instead of stat?



-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org