Let's Encrypt

This commit is contained in:
Ken-Håvard Lieng 2016-01-04 19:26:32 +01:00
parent 22892a4073
commit b55cb13e44
82 changed files with 13536 additions and 107 deletions

View file

@ -4,7 +4,6 @@ import (
"bytes"
"encoding/json"
"log"
"path"
"strconv"
"strings"
"time"
@ -313,7 +312,7 @@ func (u *User) Close() {
func (u *User) openMessageLog() {
var err error
u.messageLog, err = bolt.Open(path.Join(appDir, "logs", u.UUID+"_log"), 0600, nil)
u.messageLog, err = bolt.Open(Path.Log(u.UUID), 0600, nil)
if err != nil {
log.Fatal(err)
}
@ -324,7 +323,7 @@ func (u *User) openMessageLog() {
return nil
})
indexPath := path.Join(appDir, "logs", u.UUID+"_index")
indexPath := Path.Index(u.UUID)
u.messageIndex, err = bleve.Open(indexPath)
if err == bleve.ErrorIndexPathDoesNotExist {
mapping := bleve.NewIndexMapping()