Skip to content

Commit

Permalink
include zipfile name
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Jul 13, 2024
1 parent 38a334d commit c88aca8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,10 @@ impl Storage for ZipStorage {

impl ZipStorage {
pub fn from_file<P: AsRef<Path>>(location: P) -> Result<Self> {
let display_name = location.as_ref().to_path_buf().into_os_string().into_string().unwrap();
let zip_file = match File::open(location.as_ref()) {
Ok(zip_file) => zip_file,
Err(_) => panic!("cannot open zip file storage containing sketches."),
Err(_) => panic!("cannot open zip file storage '{display_name}' containing sketches."),
};
let mapping = unsafe { memmap2::Mmap::map(&zip_file)? };

Expand Down

0 comments on commit c88aca8

Please sign in to comment.