From: Christian Herdtweck Date: Mon, 25 Jul 2016 09:54:36 +0000 (+0200) Subject: check for multi-volume compatibility of tar modes also if reading X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=refs%2Fheads%2Fmulti-volume-improvements;p=python-delta-tar check for multi-volume compatibility of tar modes also if reading for reading, there is no max_volume_size but a new_volume_handler given --- diff --git a/deltatar/tarfile.py b/deltatar/tarfile.py index bddfbb7..b6192f0 100644 --- a/deltatar/tarfile.py +++ b/deltatar/tarfile.py @@ -2206,9 +2206,9 @@ class TarFile(object): if comptype == 'gz' or comptype == 'bz2': kwargs['compresslevel'] = compresslevel - if 'max_volume_size' in kwargs: - if comptype != 'tar' and filemode in 'wa' \ - and kwargs['max_volume_size']: + if 'max_volume_size' in kwargs or 'new_volume_handler' in kwargs: + if comptype != 'tar' and (kwargs['new_volume_handler'] or + kwargs['max_volume_size']): import warnings warnings.warn('Only the first volume will be compressed ' 'for modes with "w:"!')