fixed totp and go mod

This commit is contained in:
ston1th 2019-05-04 21:51:48 +02:00
commit 3a3140875e
297 changed files with 52714 additions and 15245 deletions

View file

@ -4,7 +4,6 @@ package log
import (
"git.giftfish.de/ston1th/docstore/pkg/core"
"git.giftfish.de/ston1th/godrop/v2"
stdlog "log"
"os"
"path/filepath"
@ -20,13 +19,7 @@ func InitLogger(cfg core.Config) {
if cfg.LogFile == "-" {
return
}
logfile := filepath.Join(cfg.DataDir, cfg.LogFile)
err := godrop.Unveil(logfile, "rwc")
if err != nil {
stdlog.Fatal(err)
return
}
f, err := os.OpenFile(logfile, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0640)
f, err := os.OpenFile(filepath.Join(cfg.DataDir, cfg.LogFile), os.O_RDWR|os.O_CREATE|os.O_APPEND, 0640)
if err != nil {
stdlog.Fatal(err)
}