adamdebreceni commented on a change in pull request #1015:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1015#discussion_r582594616
##########
File path: libminifi/include/utils/file/FileUtils.h
##########
@@ -334,20 +332,28 @@ inline bool get_uid_gid(const std::string &path, uint64_t
&uid, uint64_t &gid) {
#endif
inline bool is_directory(const char * path) {
+#ifndef WIN32
struct stat dir_stat;
- if (stat(path, &dir_stat) < 0) {
+ if (stat(path, &dir_stat) != 0) {
return false;
}
return S_ISDIR(dir_stat.st_mode) != 0;
+#else
+ struct _stat64 dir_stat;
+ if (_stat64(path, &dir_stat) != 0) {
+ return false;
+ }
+ return S_ISDIR(dir_stat.st_mode) != 0;
+#endif
}
inline bool exists(const std::string& path) {
#ifdef USE_BOOST
return boost::filesystem::exists(path);
#else
#ifdef WIN32
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.
For queries about this service, please contact Infrastructure at:
[email protected]