[ https://issues.apache.org/jira/browse/HDFS-15909?focusedWorklogId=573535&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-573535 ]
ASF GitHub Bot logged work on HDFS-15909: ----------------------------------------- Author: ASF GitHub Bot Created on: 29/Mar/21 14:47 Start Date: 29/Mar/21 14:47 Worklog Time Spent: 10m Work Description: GauthamBanasandra commented on a change in pull request #2792: URL: https://github.com/apache/hadoop/pull/2792#discussion_r603357750 ########## 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? Yes. fnmatch returns 0 on a successful match. -- 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: 573535) Time Spent: 1h 20m (was: 1h 10m) > 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: 1h 20m > 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