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
590f0761f4, doesn't explain that. If that
is still necessary, better to add lseek(SEEK_DATA) check later.
This commit is contained in:
Gleb Smirnoff authored and Justin Maggard committed 2018-01-16 17:02:01 -08:00
1 parent 958da67592
commit 42f0630198
1 file changed
+1 -1
+1 -1
View File
@@ -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);
}