[ https://issues.apache.org/jira/browse/HDFS-15909?focusedWorklogId=570648&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-570648 ]
ASF GitHub Bot logged work on HDFS-15909: ----------------------------------------- Author: ASF GitHub Bot Created on: 23/Mar/21 17:04 Start Date: 23/Mar/21 17:04 Worklog Time Spent: 10m Work Description: goiri commented on a change in pull request #2792: URL: https://github.com/apache/hadoop/pull/2792#discussion_r599761580 ########## File path: hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/fs/filesystem.cc ########## @@ -722,16 +722,16 @@ void FileSystemImpl::FindShim(const Status &stat, const std::vector<StatInfo> & for (StatInfo const& si : stat_infos) { //If we are at the last depth and it matches both path and name, we need to output it. if (operational_state->depth == shared_state->dirs.size() - 2 - && !fnmatch(shared_state->dirs[operational_state->depth + 1].c_str(), si.path.c_str(), 0) - && !fnmatch(shared_state->name.c_str(), si.path.c_str(), 0)) { + && XPlatform::Syscall::FnMatch(shared_state->dirs[operational_state->depth + 1], si.path) + && XPlatform::Syscall::FnMatch(shared_state->name, si.path)) { outputs.push_back(si); } //Skip if not directory if(si.file_type != StatInfo::IS_DIR) { continue; } //Checking for a match with the path at the current depth - if(!fnmatch(shared_state->dirs[operational_state->depth + 1].c_str(), si.path.c_str(), 0)){ + if(XPlatform::Syscall::FnMatch(shared_state->dirs[operational_state->depth + 1], si.path)) { Review comment: XPlatform::Syscall::FnMatch is equivalent to !fnmatch? I have to say that the original was a little antiintuitive. -- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 570648) Time Spent: 40m (was: 0.5h) > Make fnmatch cross platform > --------------------------- > > Key: HDFS-15909 > URL: https://issues.apache.org/jira/browse/HDFS-15909 > Project: Hadoop HDFS > Issue Type: Improvement > Components: libhdfs++ > Affects Versions: 3.2.2 > Reporter: Gautham Banasandra > Assignee: Gautham Banasandra > Priority: Major > Labels: pull-request-available > Time Spent: 40m > Remaining Estimate: 0h > > The function fnmatch isn't available in Visual C++. Need to make this cross > platform. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org