Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-unixfs
Commits
5478c3c4
Commit
5478c3c4
authored
Jan 26, 2015
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unixfs/tar: Use current date for file timestamps
parent
c9ea7960
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
tar/reader.go
tar/reader.go
+3
-0
No files found.
tar/reader.go
View file @
5478c3c4
...
...
@@ -7,6 +7,7 @@ import (
"io"
p
"path"
"strings"
"time"
mdag
"github.com/jbenet/go-ipfs/merkledag"
path
"github.com/jbenet/go-ipfs/path"
...
...
@@ -79,6 +80,7 @@ func (i *Reader) writeToBuf(dagnode *mdag.Node, path string, depth int) {
Name
:
path
,
Typeflag
:
tar
.
TypeDir
,
Mode
:
0777
,
ModTime
:
time
.
Now
(),
// TODO: set mode, dates, etc. when added to unixFS
})
if
err
!=
nil
{
...
...
@@ -103,6 +105,7 @@ func (i *Reader) writeToBuf(dagnode *mdag.Node, path string, depth int) {
Size
:
int64
(
pb
.
GetFilesize
()),
Typeflag
:
tar
.
TypeReg
,
Mode
:
0644
,
ModTime
:
time
.
Now
(),
// TODO: set mode, dates, etc. when added to unixFS
})
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment