aboutsummaryrefslogtreecommitdiff
path: root/dynamic.go
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic.go')
-rw-r--r--dynamic.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/dynamic.go b/dynamic.go
index ace70ed..9df04b9 100644
--- a/dynamic.go
+++ b/dynamic.go
@@ -46,7 +46,12 @@ func handle(w http.ResponseWriter, r *http.Request) {
46 // parse these dirs 46 // parse these dirs
47 elements := make(map[string][]byte) 47 elements := make(map[string][]byte)
48 for i := len(dirs) - 1; i >= 0; i-- { 48 for i := len(dirs) - 1; i >= 0; i-- {
49 elements = parse(path.Join(*settings.sourceDir, dirs[i]), elements, settings.exts, false) 49 parsed := false
50 elements, parsed = parse(path.Join(*settings.sourceDir, dirs[i]), elements, settings.exts, false)
51 if (i == len(dirs)-1) && !parsed {
52 http.Error(w, "404 page not found", http.StatusNotFound)
53 return
54 }
50 } 55 }
51 56
52 // render the page 57 // render the page