Corrections

This commit is contained in:
Arpad Müller
2024-06-06 23:42:37 +02:00
parent 80803ff098
commit 3182c3361a

View File

@@ -310,14 +310,15 @@ pub(crate) async fn main(cmd: &LayerCmd) -> Result<()> {
let Some(file_name) = file_key.object_name() else {
continue;
};
// Split off the final part. Sometimes this cuts off actually important pieces in case of legacy layer files, but usually it doesn't.
let Some(file_without_generation) = file_name.rsplit_once('-') else {
continue;
};
let Ok(LayerName::Image(_layer_file_name)) =
LayerName::from_str(file_without_generation.0)
else {
// Skipping because it's either not a layer or a delta layer
//println!("object {file_name}: not a delta layer");
// Skipping because it's either not a layer or an image layer
//println!("object {file_name}: not an image layer");
continue;
};
let json_file_path = layers_dir.join(format!("{file_name}.json"));