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.
This commit is contained in:
Gleb Smirnoff 2017-12-29 15:17:10 -08:00 committed by Justin Maggard
parent 958da67592
commit 42f0630198

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);
}