From: Christian Herdtweck Date: Fri, 15 Jul 2016 10:42:06 +0000 (+0200) Subject: force max_volume_size >= RECORDSIZE since last volume is filled with 0s until RECORDSIZE X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=fa5f59cdc28dfd2dde73156ad8613b898bc4497c;p=python-delta-tar force max_volume_size >= RECORDSIZE since last volume is filled with 0s until RECORDSIZE --- diff --git a/deltatar/tarfile.py b/deltatar/tarfile.py index 6deff35..5497de6 100644 --- a/deltatar/tarfile.py +++ b/deltatar/tarfile.py @@ -2077,8 +2077,9 @@ class TarFile(object): self.errorlevel = errorlevel # Init datastructures. - if max_volume_size and max_volume_size < 3*BLOCKSIZE: - raise ValueError("max_volume_size needs to be at least %d" % (3*BLOCKSIZE)) + if max_volume_size and max_volume_size < RECORDSIZE: + raise ValueError("max_volume_size needs to be at least RECORDSIZE " + "({})".format(RECORDSIZE)) if max_volume_size and not callable(new_volume_handler): raise ValueError("new_volume_handler needs to be set and be callable for multivolume support") if max_volume_size: