From d5889875cae2b230158a65347e89f14147f231c2 Mon Sep 17 00:00:00 2001 From: Christian Dreier Date: Sat, 23 Dec 2017 22:57:00 +0100 Subject: [PATCH] fixed filewalker for user presentations --- main.go | 4 +--- slides.go | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 0c85741..51d6f87 100644 --- a/main.go +++ b/main.go @@ -20,11 +20,9 @@ type holder struct { connection *websocket.Conn } -const exampleSlidesDirName = "example" - func main() { port := flag.String("port", "8080", "http port the server is starting on") - rootDir := flag.String("dir", exampleSlidesDirName, "root dir of your presentation") + rootDir := flag.String("dir", "example", "root dir of your presentation") title := flag.String("title", "Slide", "html title") devMode := flag.Bool("dev", false, "dev true to start a filewatcher and reload the edited slide") flag.Parse() diff --git a/slides.go b/slides.go index c8ec6b2..7d86362 100644 --- a/slides.go +++ b/slides.go @@ -60,7 +60,7 @@ func (h *holder) parse() { h.slides = make([]slide, 0) filepath.Walk(h.dir, func(path string, info os.FileInfo, err error) error { if info == nil || info.IsDir() { - return filepath.SkipDir + return nil } // reading all the files, check file ext before reading? content, err := ioutil.ReadFile(path)