Use os.Lstat instead of os.Stat so we ignore symlinks completely

This commit is contained in:
Nick Craig-Wood 2012-11-28 17:12:54 +00:00
parent c42bafc4e2
commit 5ebbe342b8

View File

@ -152,7 +152,7 @@ func walk(root string) FsObjects {
if err != nil {
log.Printf("Failed to open directory: %s: %s", path, err)
} else {
info, err := os.Stat(path)
info, err := os.Lstat(path)
if err != nil {
log.Printf("Failed to stat %s: %s", path, err)
return nil