From 933b7a9a34c75e966d6c8be59ebab97d602ff2db Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 8 Feb 2020 20:56:14 +1000 Subject: [PATCH] ignore 0 byte files when picking up changes --- rslib/src/media/changetracker.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rslib/src/media/changetracker.rs b/rslib/src/media/changetracker.rs index fde118384..208f3cbb2 100644 --- a/rslib/src/media/changetracker.rs +++ b/rslib/src/media/changetracker.rs @@ -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());