fixes
This commit is contained in:
@@ -30,6 +30,14 @@ func run(updateChan <-chan struct{}) {
|
||||
slog.SetLogLoggerLevel(slog.LevelDebug)
|
||||
}
|
||||
|
||||
if !filepath.IsAbs(documentRoot) {
|
||||
if v, err := filepath.Abs(documentRoot); err == nil {
|
||||
documentRoot = v
|
||||
} else {
|
||||
fatal("failed to get absolute path from document-root flag: "+err.Error(), 2)
|
||||
}
|
||||
}
|
||||
|
||||
slog.Info("loading .htpasswd")
|
||||
h, err := htpasswd.Open(filepath.Join(documentRoot, ".htpasswd"))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user