Skip to content

Commit

Permalink
fixed filewalker for user presentations
Browse files Browse the repository at this point in the history
  • Loading branch information
cdreier committed Dec 23, 2017
1 parent 8dd5b0e commit d588987
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion slides.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d588987

Please sign in to comment.