* Fixed bug regarding relative vs. absolute path evaluation for header/footer files.
authorUrban Wallasch <urban.wallasch@freenet.de>
Fri, 12 Apr 2019 21:48:20 +0000 (23:48 +0200)
committerUrban Wallasch <urban.wallasch@freenet.de>
Fri, 12 Apr 2019 21:48:20 +0000 (23:48 +0200)
config.go

index d7c53a1080dda30566a43aa1da80d5b47b39c4bf..4841c669b6557845b90ac9eca9d1b90c670ad27a 100644 (file)
--- a/config.go
+++ b/config.go
@@ -170,10 +170,10 @@ func initialize() {
 
        cfg.docroot, err = canonicalizePath(cfg.docroot)
        checkFatal(err, "canonicalizePath "+cfg.docroot)
-       if filepath.IsAbs(cfg.header) {
+       if !filepath.IsAbs(cfg.header) {
                cfg.header = filepath.Join(cfg.docroot, cfg.header)
        }
-       if filepath.IsAbs(cfg.footer) {
+       if !filepath.IsAbs(cfg.footer) {
                cfg.footer = filepath.Join(cfg.docroot, cfg.footer)
        }
        cfg.idxpage = path.Base(filepath.ToSlash(cfg.idxpage))