Determine if path is directory for XFS filesystem
The dir_result->d_type == DT_DIR does not work on XFS file systems. This is fixed by using the FileLister::isDirectory when dir_result->d_type == DT_UNKNOWN. According to readdir_r documentation, the case where d_type == DT_UNKNOWN should be handled.
This commit is contained in:
parent
642cc57428
commit
53f07c1423
|
@ -198,7 +198,7 @@ static void addFiles2(std::map<std::string, std::size_t> &files,
|
|||
|
||||
new_path = path + '/' + dir_result->d_name;
|
||||
|
||||
if (dir_result->d_type == DT_DIR) {
|
||||
if (dir_result->d_type == DT_DIR || (dir_result->d_type == DT_UNKNOWN && FileLister::isDirectory(new_path))) {
|
||||
if (recursive && !ignored.Match(new_path)) {
|
||||
addFiles2(files, new_path, extra, recursive, ignored);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue