Fix parent directory walking logic to work at the DocRoot.

This commit is contained in:
Solderpunk 2020-06-10 21:20:01 +02:00
parent cb1e0da7d5
commit 7fb5ca052b

View file

@ -233,11 +233,11 @@ func parseMollyFiles(path string, info os.FileInfo, config *Config) {
} }
dirs = append(dirs, path) dirs = append(dirs, path)
for { for {
subpath := filepath.Dir(path) if path == filepath.Clean(config.DocBase) {
dirs = append(dirs, subpath)
if subpath == filepath.Clean(config.DocBase) {
break break
} }
subpath := filepath.Dir(path)
dirs = append(dirs, subpath)
path = subpath path = subpath
} }
// Parse files // Parse files