aboutsummaryrefslogtreecommitdiff
path: root/content/pipelines/serial.go
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2014-04-15 09:48:42 +1000
committerAndrew Gerrand <adg@golang.org>2014-04-15 09:48:42 +1000
commit26209f9d1cbd0faeef306f1da2c43184d489a9a8 (patch)
tree41fd0b69a55be4530977cd2263d372c6f86a38e6 /content/pipelines/serial.go
parentd6e30255673913da92fb4ea68e95ce61938c55eb (diff)
go.blog: use !info.Mode().IsRegular() instead of info.Isdir()
That way we'll only try to hash regular files. Fixes golang/go#7770. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/87860043
Diffstat (limited to 'content/pipelines/serial.go')
-rw-r--r--content/pipelines/serial.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/pipelines/serial.go b/content/pipelines/serial.go
index 7a44ca1..3afda91 100644
--- a/content/pipelines/serial.go
+++ b/content/pipelines/serial.go
@@ -18,7 +18,7 @@ func MD5All(root string) (map[string][md5.Size]byte, error) {
if err != nil {
return err
}
- if info.IsDir() {
+ if !info.Mode().IsRegular() {
return nil
}
data, err := ioutil.ReadFile(path) // HL