Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
301c0a63
Commit
301c0a63
authored
Dec 21, 2016
by
Aron Fischer
Committed by
Felix Lange
Dec 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swarm/storage: call size before seek-from-end (#3469)
parent
65f486ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
chunker.go
swarm/storage/chunker.go
+5
-2
No files found.
swarm/storage/chunker.go
View file @
301c0a63
...
...
@@ -483,8 +483,11 @@ func (s *LazyChunkReader) Seek(offset int64, whence int) (int64, error) {
case
1
:
offset
+=
s
.
off
case
2
:
if
s
.
chunk
==
nil
{
return
0
,
fmt
.
Errorf
(
"seek from the end requires rootchunk for size. call Size first"
)
if
s
.
chunk
==
nil
{
//seek from the end requires rootchunk for size. call Size first
_
,
err
:=
s
.
Size
(
nil
)
if
err
!=
nil
{
return
0
,
fmt
.
Errorf
(
"can't get size: %v"
,
err
)
}
}
offset
+=
s
.
chunk
.
Size
}
...
...
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