Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
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
Kirill Smelkov
go-fuse
Commits
b22a55a5
Commit
b22a55a5
authored
May 26, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't print warning for splicing zero length file.
parent
e98b6688
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
fuse/loopback_test.go
fuse/loopback_test.go
+13
-0
fuse/mountstate.go
fuse/mountstate.go
+1
-1
No files found.
fuse/loopback_test.go
View file @
b22a55a5
...
...
@@ -525,6 +525,19 @@ func TestFSync(t *testing.T) {
f
.
Close
()
}
func
TestReadZero
(
t
*
testing
.
T
)
{
ts
:=
NewTestCase
(
t
)
defer
ts
.
Cleanup
()
err
:=
ioutil
.
WriteFile
(
ts
.
origFile
,
[]
byte
{},
0644
)
CheckSuccess
(
err
)
back
,
err
:=
ioutil
.
ReadFile
(
ts
.
mountFile
)
CheckSuccess
(
err
)
if
len
(
back
)
!=
0
{
t
.
Errorf
(
"content length: got %d want %d"
,
len
(
back
),
0
)
}
}
func
TestReadLarge
(
t
*
testing
.
T
)
{
ts
:=
NewTestCase
(
t
)
defer
ts
.
Cleanup
()
...
...
fuse/mountstate.go
View file @
b22a55a5
...
...
@@ -399,7 +399,7 @@ func (ms *MountState) TrySplice(header []byte, req *request,
}
else
{
n
,
err
=
finalSplice
.
LoadFromAt
(
fd
,
size
,
off
)
}
if
err
==
io
.
EOF
||
(
err
==
nil
&&
n
<
size
&&
n
>
0
)
{
if
err
==
io
.
EOF
||
(
err
==
nil
&&
n
<
size
)
{
discard
:=
make
([]
byte
,
len
(
header
))
_
,
err
=
finalSplice
.
Read
(
discard
)
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