handle read errors during zip build

This commit is contained in:
Damien Elmes 2020-02-08 18:04:09 +10:00
parent eddf9fdc44
commit bf50f88540

View File

@ -683,7 +683,14 @@ fn zip_files<'a>(
continue; continue;
} }
let file_data = data_for_file(media_folder, &file.fname)?; let file_data = match data_for_file(media_folder, &file.fname) {
Ok(data) => data,
Err(e) => {
debug!("error accessing {}: {}", &file.fname, e);
invalid_entries.push(&file.fname);
continue;
}
};
if let Some(data) = &file_data { if let Some(data) = &file_data {
if data.is_empty() { if data.is_empty() {