From 42f0630198c17a63bc8d465adee90dc31e1591fa Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Fri, 29 Dec 2017 15:17:10 -0800 Subject: [PATCH] Remove (st.st_blocks<<9 >= st.st_size) check. It may fail if a file system supports deduplication, compression and other features. My guess the goal was to skip files with holes in them. Original commit 590f0761f4aba64c4a3b4c8f11543a929178da38, doesn't explain that. If that is still necessary, better to add lseek(SEEK_DATA) check later. --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 45f6830..d93b871 100644 --- a/monitor.c +++ b/monitor.c @@ -540,7 +540,7 @@ monitor_insert_directory(int fd, char *name, const char * path) } else if( type == TYPE_FILE ) { - if( (stat(path_buf, &st) == 0) && (st.st_blocks<<9 >= st.st_size) ) + if( (stat(path_buf, &st) == 0) ) { monitor_insert_file(esc_name, path_buf); }