diff --git a/src/lib/file/encoder.rs b/src/lib/file/encoder.rs index 5eab7fd..ed740a4 100644 --- a/src/lib/file/encoder.rs +++ b/src/lib/file/encoder.rs @@ -136,7 +136,7 @@ impl FileEncoder { let buf = match &self.filetype_encoding_information { FileTypeEncodingInformation::Directory(directory_children) => { let encoded_directory_children = if directory_children.is_empty() { - Vec::new() + Vec::::new().encode_directly() } else { directory_children.encode_directly() }; diff --git a/src/lib/io/zffwriter.rs b/src/lib/io/zffwriter.rs index 8f621c1..2adbca9 100644 --- a/src/lib/io/zffwriter.rs +++ b/src/lib/io/zffwriter.rs @@ -868,6 +868,7 @@ fn create_iterator>( warn!("The content of the file {} can't be read, due the following error: {e}.\ The file will be stored as an empty file.", ¤t_dir.as_ref().display()); file_header.metadata_ext.insert(METADATA_EXT_KEY_UNACCESSABLE_FILE.to_string(), current_dir.as_ref().to_string_lossy().to_string().into()); + files.push((current_dir.as_ref().to_path_buf(), file_header)); return Err(e.into()); } };