mirror of
https://github.com/stalwartlabs/mail-server.git
synced 2025-11-09 21:31:12 +08:00
Do not panic when report hash = 0 (#60)
This commit is contained in:
parent
426c073b25
commit
79599f2f9c
1 changed files with 9 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue