Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb committed Aug 18, 2024
1 parent 6bc2c51 commit 38013af
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/core/src/storage/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,24 +297,16 @@ impl Storage for FSStorage {
}

fn load_sig(&self, path: &str) -> Result<SigStore> {
eprintln!("FSStorage: load_sig {path}");
let sig = match path {
x if x.ends_with(".sig") || x.ends_with(".sig.gz") => {
let raw = self.load(path)?;
let sig = match self.load(path) {
Ok(raw) => {
let sig = Signature::from_reader(&mut &raw[..])?
.swap_remove(0)
.into();
sig
},
Err(_) => {
todo!("cannot load from path '{path}'")
}
x if x.ends_with(".zip") => {
let store = ZipStorage::from_file(path)?;
let fnames = store.filenames().unwrap();
eprintln!("ZYZ {}", fnames.len());
todo!("fail here, now")
// @CTB

}
_ => todo!("cannot load from path '{path}'"),
};

Ok(sig)
Expand Down

0 comments on commit 38013af

Please sign in to comment.