nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #616: MINIFICPP-986 - GetFile processor incorrectly identifies hidden files…
Date Thu, 25 Jul 2019 12:16:17 GMT
bakaid commented on a change in pull request #616: MINIFICPP-986 - GetFile processor incorrectly
identifies hidden files…
URL: https://github.com/apache/nifi-minifi-cpp/pull/616#discussion_r307262994
 
 

 ##########
 File path: libminifi/include/utils/file/FileUtils.h
 ##########
 @@ -541,6 +541,15 @@ class FileUtils {
     return child_path;
   }
 
+  static bool is_hidden(const std::string& path){
+#ifdef WIN32
+    DWORD attributes = GetFileAttributes(path.c_str());
 
 Review comment:
   Please use `GetFileAttributesA` here. If you do not specify the A or the W version it depends
on configuration (defines) which will be the default which can be accidentally set to W somewhere
and we have a segfault on our hands.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message