1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 17:47:03 +00:00

file: Remove index and dir mutexes

HashLock makes these redundant.  #77
This commit is contained in:
James Hillyerd
2018-03-18 13:58:47 -07:00
parent 5cb07d5780
commit 0d0e07da70
3 changed files with 2 additions and 26 deletions

View File

@@ -1,7 +1,6 @@
package file
import (
"bufio"
"io"
"net/mail"
"os"
@@ -22,10 +21,6 @@ type Message struct {
Fto []*mail.Address
Fsubject string
Fsize int64
// These are for creating new messages only
writable bool
writerFile *os.File
writer *bufio.Writer
}
// newMessage creates a new FileMessage object and sets the Date and ID fields.
@@ -48,7 +43,7 @@ func (mb *mbox) newMessage() (*Message, error) {
}
date := time.Now()
id := generateID(date)
return &Message{mailbox: mb, Fid: id, Fdate: date, writable: true}, nil
return &Message{mailbox: mb, Fid: id, Fdate: date}, nil
}
// Mailbox returns the name of the mailbox this message resides in.