diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/filesystem.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/filesystem.go b/source/filesystem.go index d89149dc6..df0a4989c 100644 --- a/source/filesystem.go +++ b/source/filesystem.go @@ -15,13 +15,13 @@ package source import ( "bytes" + "github.com/spf13/hugo/helpers" + jww "github.com/spf13/jwalterweatherman" "io" "io/ioutil" "os" "path/filepath" "strings" - - "github.com/spf13/hugo/helpers" ) type Input interface { @@ -84,6 +84,11 @@ func (f *Filesystem) captureFiles() { return nil } + if fi.Mode()&os.ModeSymlink == os.ModeSymlink { + jww.ERROR.Printf("Symbolic links not supported, skipping '%s'", filePath) + return nil + } + if fi.IsDir() { if f.avoid(filePath) || isNonProcessablePath(filePath) { return filepath.SkipDir |