From 7bc7d50c0ce9f874b30a19536095e2554c08b6b4 Mon Sep 17 00:00:00 2001 From: Sebastian Frank Date: Tue, 12 Mar 2019 13:24:38 +0100 Subject: [PATCH] fixes #9, -out ./foobar --- config/tree.go | 2 +- main.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/config/tree.go b/config/tree.go index 4a130f0..6f56e62 100644 --- a/config/tree.go +++ b/config/tree.go @@ -63,7 +63,7 @@ type CollectionConfig struct { DataKey string `yaml:"DataKey"` Hidden bool `yaml:"Hidden"` Template string `yaml:"Template"` - Recursive bool `yaml:"Recursive"` + //Recursive bool `yaml:"Recursive"` } `yaml:"NavTemplate"` } diff --git a/main.go b/main.go index 71784b0..3a52098 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "flag" "fmt" "os" + "path" "gitbase.de/apairon/mark2web/config" "gitbase.de/apairon/mark2web/helper" @@ -48,11 +49,15 @@ func main() { if inDir == nil || *inDir == "" { log.Panic("input directory not specified") } + iDir := path.Clean(*inDir) + inDir = &iDir log.Infof("input directory: %s", *inDir) if outDir == nil || *outDir == "" { log.Panic("output directory not specified") } + oDir := path.Clean(*outDir) + outDir = &oDir log.Infof("output directory: %s", *outDir) if createOutDir != nil && *createOutDir {