@cryptotaxi247 / kubo / commits / 5a60b7b2e

unixfs/tar: Use current date for file timestamps

Matt Bell committed Jan 26, 2015 at 16:57 UTC 5a60b7b2e70349bf87aa8c797d25f9db11f14193
1 file changed +3
unixfs/tar/reader.go
+3
@@ -7,6 +7,7 @@ import (
7 "io"
8 p "path"
9 "strings"
10 + "time"
11
12 mdag "github.com/jbenet/go-ipfs/merkledag"
13 path "github.com/jbenet/go-ipfs/path"
@@ -79,6 +80,7 @@ func (i *Reader) writeToBuf(dagnode *mdag.Node, path string, depth int) {
80 Name: path,
81 Typeflag: tar.TypeDir,
82 Mode: 0777,
83 + ModTime: time.Now(),
84 // TODO: set mode, dates, etc. when added to unixFS
85 })
86 if err != nil {
@@ -103,6 +105,7 @@ func (i *Reader) writeToBuf(dagnode *mdag.Node, path string, depth int) {
105 Size: int64(pb.GetFilesize()),
106 Typeflag: tar.TypeReg,
107 Mode: 0644,
108 + ModTime: time.Now(),
109 // TODO: set mode, dates, etc. when added to unixFS
110 })
111 if err != nil {