Fix: Upload broken

Fixes #7
This commit is contained in:
Felix Geisendörfer 2013-03-25 10:27:31 +01:00
parent c8ab86ee3e
commit 1e9c701aca
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ func (s *DataStore) WriteFileChunk(id string, start int64, end int64, src io.Rea
size := end - start + 1
n, err := io.CopyN(file, src, size)
if n > 0 {
entry := logEntry{Chunk: &chunkEntry{Start: start, End: n - 1}}
entry := logEntry{Chunk: &chunkEntry{Start: start, End: start+n-1}}
if err := s.appendFileLog(id, entry); err != nil {
return err
}