don't filter out invalid filenames when we're sending them as a deletion

This commit is contained in:
Damien Elmes 2020-02-11 19:27:25 +10:00
parent 44a1a5f987
commit d394aed5fd

View File

@ -676,13 +676,6 @@ fn zip_files<'a>(
break; 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) { let file_data = match data_for_file(media_folder, &file.fname) {
Ok(data) => data, Ok(data) => data,
Err(e) => { Err(e) => {
@ -693,6 +686,13 @@ fn zip_files<'a>(
}; };
if let Some(data) = &file_data { 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() { if data.is_empty() {
invalid_entries.push(&file.fname); invalid_entries.push(&file.fname);
continue; continue;