From issues-return-81736-archive-asf-public=cust-asf.ponee.io@nifi.apache.org Thu Jul 25 12:16:23 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id E725C18066C for ; Thu, 25 Jul 2019 14:16:22 +0200 (CEST) Received: (qmail 47820 invoked by uid 500); 25 Jul 2019 12:16:22 -0000 Mailing-List: contact issues-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list issues@nifi.apache.org Received: (qmail 47811 invoked by uid 99); 25 Jul 2019 12:16:22 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2019 12:16:22 +0000 From: GitBox To: issues@nifi.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bnifi-minifi-cpp=5D_bakaid_commented_on_a_change?= =?utf-8?q?_in_pull_request_=23616=3A_MINIFICPP-986_-_GetFile_processor_in?= =?utf-8?q?correctly_identifies_hidden_files=E2=80=A6?= Message-ID: <156405697721.30047.7079647183855699974.gitbox@gitbox.apache.org> Date: Thu, 25 Jul 2019 12:16:17 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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