Commit e7fe1944 authored by David Symonds's avatar David Symonds

archive/tar: small simplification using FileMode.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7305043
parent d1e16d06
......@@ -80,7 +80,7 @@ func FileInfoHeader(fi os.FileInfo, link string) (*Header, error) {
Mode: int64(fi.Mode().Perm()), // or'd with c_IS* constants later
}
switch {
case fi.Mode()&os.ModeType == 0:
case fi.Mode().IsRegular():
h.Mode |= c_ISREG
h.Typeflag = TypeReg
h.Size = fi.Size()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment