From 53f07c1423d16965c29033e5c6cb0e5c1a5fc755 Mon Sep 17 00:00:00 2001 From: Lau bakman Date: Wed, 20 Jan 2016 12:55:48 +0100 Subject: [PATCH] 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. --- cli/filelister.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/filelister.cpp b/cli/filelister.cpp index b08f9ca61..c64445148 100644 --- a/cli/filelister.cpp +++ b/cli/filelister.cpp @@ -198,7 +198,7 @@ static void addFiles2(std::map &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); }