From 541c0aa0e75248755cb84e3824c11d35911539d3 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Sun, 31 Mar 2024 23:43:46 +0300 Subject: [PATCH] Allow multi-vol ENDARC where NEXTVOL flag is missing. Let SPLIT_AFTER on last file to trigger next volume. Fixes: #97 --- rarfile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rarfile.py b/rarfile.py index 478a2be..6cef88f 100644 --- a/rarfile.py +++ b/rarfile.py @@ -1180,7 +1180,9 @@ def _parse_real(self): if not self._password: break elif h.type == RAR_BLOCK_ENDARC: - more_vols = (h.flags & RAR_ENDARC_NEXT_VOLUME) > 0 + # use flag, but also allow RAR 2.x logic below to trigger + if h.flags & RAR_ENDARC_NEXT_VOLUME: + more_vols = True endarc = True if raise_need_first_vol and (h.flags & RAR_ENDARC_VOLNR) > 0: raise NeedFirstVolume(