mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
ERROR-log on symbolic links
filepath.Walk does not follow symbolic links. There's no easy fix for that outside of Go, so the best we can do for now is to give notice to the end user by ERROR log statements. This commit also fixes a related panic situation in GenerateTemplateNameFrom when the layout dir was a symbolic link. Fixes #283
This commit is contained in:
@@ -256,6 +256,11 @@ func getDirList() []string {
|
||||
return nil
|
||||
}
|
||||
|
||||
if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
|
||||
jww.ERROR.Printf("Symbolic links not supported, skipping '%s'", path)
|
||||
return nil
|
||||
}
|
||||
|
||||
if fi.IsDir() {
|
||||
a = append(a, path)
|
||||
}
|
||||
|
Reference in New Issue
Block a user