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
1 changed files with 3 additions and 3 deletions

View File

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