From ddecf7060b2b0316d29a2d4e13d2a4160e1badd7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 3 Jun 1998 02:35:51 +0000 Subject: [PATCH] if the user passes a block size on the command line then don't adapt the block size. --- rsync.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.34.1