From 53f625db5a4839e78dc77ed7f649ad66b122a685 Mon Sep 17 00:00:00 2001 From: "[object Object]" Date: Sun, 6 Aug 2023 04:35:50 +0300 Subject: [PATCH] Update dumper.py --- x_access_dumper/dumper.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x_access_dumper/dumper.py b/x_access_dumper/dumper.py index 18b8afe..f281a38 100644 --- a/x_access_dumper/dumper.py +++ b/x_access_dumper/dumper.py @@ -4,6 +4,7 @@ import collections import dataclasses import io +import math import re import typing from contextlib import asynccontextmanager @@ -384,7 +385,7 @@ async def parse_git_file( logger.debug("%s %s", sha1, filename) entry_size -= fp.tell() # Размер entry кратен 8 (добивается NULL-байтами) - fp.seek(entry_size % 8, io.SEEK_CUR) + fp.seek(math.ceil(entry_size / 8) * 8 - entry_size, io.SEEK_CUR) # Есть еще extensions, но они нигде не используются n -= 1 for filename in CHECK_GIT_FILES: