ignore 0 byte files when picking up changes

This commit is contained in:
Damien Elmes 2020-02-08 20:56:14 +10:00
parent 4fa4a5077c
commit 933b7a9a34

View File

@ -115,11 +115,14 @@ where
continue;
}
// ignore large files
// ignore large files and zero byte files
let metadata = dentry.metadata()?;
if metadata.len() > MEDIA_SYNC_FILESIZE_LIMIT as u64 {
continue;
}
if metadata.len() == 0 {
continue;
}
// remove from mtimes for later deletion tracking
let previous_mtime = mtimes.remove(fname.as_ref());