From bf50f88540453084eef0feb13751498cc96b0a08 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 8 Feb 2020 18:04:09 +1000 Subject: [PATCH] handle read errors during zip build --- rslib/src/media/sync.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rslib/src/media/sync.rs b/rslib/src/media/sync.rs index 1c4564621..f320250bc 100644 --- a/rslib/src/media/sync.rs +++ b/rslib/src/media/sync.rs @@ -683,7 +683,14 @@ fn zip_files<'a>( 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 data.is_empty() {