Skip to content

Commit

Permalink
Handle uploading and downloading files larger than a 32 bit int
Browse files Browse the repository at this point in the history
  • Loading branch information
aleitner committed Mar 30, 2017
1 parent 016167d commit cfebd38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/uploader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1277,13 +1277,13 @@ static void prepare_frame(uv_work_t *work)
char read_data[AES_BLOCK_SIZE * 256];
memset_zero(read_data, AES_BLOCK_SIZE * 256);
unsigned long int read_bytes = 0;
unsigned long int total_read = 0;
uint64_t total_read = 0;

do {
if (state->canceled) {
goto clean_variables;
}

read_bytes = pread(fileno(state->original_file),
read_data, AES_BLOCK_SIZE * 256,
shard_meta->index*state->shard_size + total_read);
Expand Down

0 comments on commit cfebd38

Please sign in to comment.