From d394aed5fdd6a4a92ba27b84dda9d83488c47b7b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 11 Feb 2020 19:27:25 +1000 Subject: [PATCH] don't filter out invalid filenames when we're sending them as a deletion --- rslib/src/media/sync.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rslib/src/media/sync.rs b/rslib/src/media/sync.rs index f320250bc..48667cd32 100644 --- a/rslib/src/media/sync.rs +++ b/rslib/src/media/sync.rs @@ -676,13 +676,6 @@ fn zip_files<'a>( break; } - let normalized = normalize_filename(&file.fname); - if let Cow::Owned(o) = normalized { - debug!("media check required: {} should be {}", &file.fname, o); - invalid_entries.push(&file.fname); - continue; - } - let file_data = match data_for_file(media_folder, &file.fname) { Ok(data) => data, Err(e) => { @@ -693,6 +686,13 @@ fn zip_files<'a>( }; if let Some(data) = &file_data { + let normalized = normalize_filename(&file.fname); + if let Cow::Owned(o) = normalized { + debug!("media check required: {} should be {}", &file.fname, o); + invalid_entries.push(&file.fname); + continue; + } + if data.is_empty() { invalid_entries.push(&file.fname); continue;