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-dms3
Commits
92f11776
Commit
92f11776
authored
Apr 29, 2017
by
Jeromy Johnson
Committed by
GitHub
Apr 29, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3889 from ipfs/fix/gateway-view-shard
Fix gateway handling of sharded directories
parents
e5529cd5
b71ef835
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
test/sharness/t0260-sharding-flag.sh
test/sharness/t0260-sharding-flag.sh
+6
-0
unixfs/io/dagreader.go
unixfs/io/dagreader.go
+1
-1
No files found.
test/sharness/t0260-sharding-flag.sh
View file @
92f11776
...
...
@@ -55,6 +55,12 @@ test_expect_success "sharded and unsharded output look the same" '
test_cmp sharded_out unsharded_out
'
test_expect_success
"ipfs cat error output the same"
'
test_expect_code 1 ipfs cat "$SHARDED" 2> sharded_err &&
test_expect_code 1 ipfs cat "$UNSHARDED" 2> unsharded_err &&
test_cmp sharded_err unsharded_err
'
test_add_large_dir_v1
()
{
exphash
=
"
$1
"
test_expect_success
"ipfs add (CIDv1) on very large directory succeeds"
'
...
...
unixfs/io/dagreader.go
View file @
92f11776
...
...
@@ -45,7 +45,7 @@ func NewDagReader(ctx context.Context, n node.Node, serv mdag.DAGService) (DagRe
}
switch
pb
.
GetType
()
{
case
ftpb
.
Data_Directory
:
case
ftpb
.
Data_Directory
,
ftpb
.
Data_HAMTShard
:
// Dont allow reading directories
return
nil
,
ErrIsDir
case
ftpb
.
Data_File
,
ftpb
.
Data_Raw
:
...
...
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