Permalink
Browse files

Merge branch 'bz1295-trunc-post'

  • Loading branch information...
2 parents 552ac5e + b1b6cd1 commit 1149a15858120283ff66b24ffadf30823dc00bcf Bryan Fink committed Nov 30, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/luwak_wm_file.erl
View
@@ -531,8 +531,8 @@ accept_streambody(RD, #ctx{handle={ok, H}, client=C, method=Method}) ->
{H2, Count} = accept_streambody1(Stream, 0, wrq:stream_req_body(RD, Size)),
H2Len = luwak_file:length(C, H2),
%% truncate will fail if passed a Start >= the length of the file
- if Count < H2Len ->
- {ok, _} = luwak_io:truncate(C, H2, Count),
+ if Offset+Count < H2Len ->
+ {ok, _} = luwak_io:truncate(C, H2, Offset+Count),
true;
true -> true
end.

0 comments on commit 1149a15

Please sign in to comment.