Clean maildirs when opened
This removes old aborted deliveries from the tmp directory.
This commit is contained in:
parent
bfefafff27
commit
04ccbd09b1
|
@ -202,6 +202,10 @@ func (w *Worker) handleOpenDirectory(msg *types.OpenDirectory) error {
|
|||
return fmt.Errorf("could not add watch to directory: %v", err)
|
||||
}
|
||||
|
||||
if err := dir.Clean(); err != nil {
|
||||
return fmt.Errorf("could not clean directory: %v", err)
|
||||
}
|
||||
|
||||
// TODO: why does this need to be sent twice??
|
||||
info := &types.DirectoryInfo{
|
||||
Info: &models.DirectoryInfo{
|
||||
|
|
Loading…
Reference in New Issue