Do not panic when report hash = 0 (#60)

This commit is contained in:
mdecimus 2023-08-26 13:13:37 +02:00
parent 426c073b25
commit 79599f2f9c

View file

@ -205,16 +205,15 @@ impl SMTP {
.eval(&RecipientDomain::new(domain))
.await
.clone();
path.push(
(policy
% *self
let hash = *self
.report
.config
.hash
.eval(&RecipientDomain::new(domain))
.await)
.to_string(),
);
.await;
if hash > 0 {
path.push((policy % hash).to_string());
}
let _ = fs::create_dir(&path).await;
// Build filename