Fix empty multipart name (#2750)

This commit is contained in:
Valentin Huber 2024-12-06 18:32:58 +01:00 committed by GitHub
parent 0569960522
commit 42ba65e864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -154,6 +154,7 @@ where
I: Input,
{
fn generate_name(&self, id: Option<CorpusId>) -> String {
if self.names().len() > 0 {
self.names
.iter()
.cloned()
@ -161,5 +162,8 @@ where
.map(|(name, generated)| format!("{name}-{generated}"))
.collect::<Vec<_>>()
.join(",")
} else {
"empty_multipart".to_string() // empty strings cause issues with OnDiskCorpus
}
}
}