Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
0d216b9f
Commit
0d216b9f
authored
Dec 25, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
98e4be92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+3
-3
wcfs/zblk.go
wcfs/zblk.go
+3
-0
No files found.
wcfs/wcfs_test.py
View file @
0d216b9f
...
@@ -206,12 +206,12 @@ def test_bigfile_empty():
...
@@ -206,12 +206,12 @@ def test_bigfile_empty():
# we wrote "hello world" after hole'th block, but size is always mutiple of blksize.
# we wrote "hello world" after hole'th block, but size is always mutiple of blksize.
fsize
=
(
hole
+
1
)
*
blksize
fsize
=
(
hole
+
1
)
*
blksize
st
=
os
.
stat
(
fpath
+
"/head/data"
)
st
=
os
.
stat
(
fpath
)
assert
st
.
st_size
==
fsize
assert
st
.
st_size
==
fsize
#assert st.st_mtime == tidtime(tidlast) FIXME proper sync
#assert st.st_mtime == tidtime(tidlast) FIXME proper sync
assert
readfile
(
fpath
+
"/head
/at"
)
==
tidlast
.
encode
(
"hex"
)
assert
readfile
(
head
+
"
/at"
)
==
tidlast
.
encode
(
"hex"
)
data
=
readfile
(
fpath
+
"/head/data"
)
data
=
readfile
(
fpath
)
assert
len
(
data
)
==
fsize
assert
len
(
data
)
==
fsize
for
i
in
range
(
hole
):
for
i
in
range
(
hole
):
assert
data
[
i
*
blksize
:(
i
+
1
)
*
blksize
]
==
b'
\
0
'
*
blksize
assert
data
[
i
*
blksize
:(
i
+
1
)
*
blksize
]
==
b'
\
0
'
*
blksize
...
...
wcfs/zblk.go
View file @
0d216b9f
...
@@ -103,6 +103,9 @@ func (zb *zBlkBase) bindZFile(zfile *ZBigFile, blk int64) {
...
@@ -103,6 +103,9 @@ func (zb *zBlkBase) bindZFile(zfile *ZBigFile, blk int64) {
blkmap
,
ok
:=
zb
.
inzfile
[
zfile
]
blkmap
,
ok
:=
zb
.
inzfile
[
zfile
]
if
!
ok
{
if
!
ok
{
blkmap
=
make
(
SetI64
,
1
)
blkmap
=
make
(
SetI64
,
1
)
if
zb
.
inzfile
==
nil
{
zb
.
inzfile
=
make
(
map
[
*
ZBigFile
]
SetI64
)
}
zb
.
inzfile
[
zfile
]
=
blkmap
zb
.
inzfile
[
zfile
]
=
blkmap
}
}
blkmap
.
Add
(
blk
)
blkmap
.
Add
(
blk
)
...
...
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