(file: &File, path: &Path)
| 366 | } |
| 367 | |
| 368 | fn zip_file_options(file: &File, path: &Path) -> Result<SimpleFileOptions> { |
| 369 | let meta = file |
| 370 | .metadata() |
| 371 | .into_diagnostic() |
| 372 | .wrap_err_with(|| format!("failed to get metadata from file `{path:?}`"))?; |
| 373 | let perm = binary_permissions(&meta); |
| 374 | let mut options = SimpleFileOptions::default().unix_permissions(perm); |
| 375 | if let Some(mtime) = binary_mtime(&meta) { |
| 376 | options = options.last_modified_time(mtime); |
| 377 | } |
| 378 | |
| 379 | Ok(options) |
| 380 | } |
| 381 | |
| 382 | fn include_files_in_zip<W: Write + Seek>( |
| 383 | zip: &mut ZipWriter<W>, |
no test coverage detected