Skip to content

Commit

Permalink
Revert 60b8851
Browse files Browse the repository at this point in the history
It breaks the cache system completely.
  • Loading branch information
fangfufu committed Aug 29, 2021
1 parent 8777cf9 commit 4bf5631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ long Cache_read(Cache *cf, char * const output_buf, const off_t len,
off_t dl_offset = (offset_start + len) / cf->blksz * cf->blksz;

/* ------------------ Check if the segment already exists ---------------*/
if (dl_offset == 0 || Seg_exist(cf, dl_offset)) {
if (Seg_exist(cf, dl_offset)) {
send = Data_read(cf, (uint8_t *) output_buf, len, offset_start);
goto bgdl;
} else {
Expand Down

0 comments on commit 4bf5631

Please sign in to comment.