X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a800434a82af8dbd59da7c27b382c9897dd90150..704f908eae2008475e3aba005331e69c98c52234:/rsync.c diff --git a/rsync.c b/rsync.c index 72c7ce9c..beb3d37f 100644 --- a/rsync.c +++ b/rsync.c @@ -356,7 +356,11 @@ static int skip_file(char *fname, /* use a larger block size for really big files */ int adapt_block_size(struct file_struct *file, int bsize) { - int ret = file->length / (10000); /* rough heuristic */ + int ret; + + if (bsize != BLOCK_SIZE) return bsize; + + ret = file->length / (10000); /* rough heuristic */ ret = ret & ~15; /* multiple of 16 */ if (ret < bsize) ret = bsize; if (ret > CHUNK_SIZE/2) ret = CHUNK_SIZE/2;