Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
fc80052c
Commit
fc80052c
authored
Jul 26, 2017
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
23dd78a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
go/zodb/storage/fs1/filestorage.go
go/zodb/storage/fs1/filestorage.go
+3
-2
No files found.
go/zodb/storage/fs1/filestorage.go
View file @
fc80052c
...
...
@@ -418,6 +418,7 @@ func (txnh *TxnHeader) LoadPrev(r io.ReaderAt, flags TxnLoadFlags) error {
}
return
err
}
// we do not care if it was error above as long as txnh.LenPrev could be read.
return
txnh
.
LoadPrev
(
r
,
flags
)
}
...
...
@@ -786,7 +787,7 @@ func Iterate(r io.ReaderAt, posStart int64, dir IterDir) *Iter {
}
// IterateFile opens file @ path and creates Iter to iterate over it.
// IterateFile opens file @ path
read-only
and creates Iter to iterate over it.
// The iteration will use buffering over os.File optimized for sequential access.
// You are responsible to eventually close the file after the iteration is done.
func
IterateFile
(
path
string
,
dir
IterDir
)
(
iter
*
Iter
,
file
*
os
.
File
,
err
error
)
{
...
...
@@ -810,7 +811,7 @@ func IterateFile(path string, dir IterDir) (iter *Iter, file *os.File, err error
return
Iterate
(
fSeq
,
txnValidFrom
,
IterForward
),
f
,
nil
case
IterBackward
:
// get file size as topPos
// get file size as topPos
and start iterating backward from it
fi
,
err
:=
f
.
Stat
()
if
err
!=
nil
{
return
nil
,
nil
,
err
...
...
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