From 96b10126ecf1bca96ae84c710e16a675f1f3dd80 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Fri, 18 Nov 2022 21:37:57 -0800 Subject: [PATCH] Fix use of mebibyte. --- filetimelapse.py | 2 +- rarpar.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/filetimelapse.py b/filetimelapse.py index 0db8953..b51603f 100644 --- a/filetimelapse.py +++ b/filetimelapse.py @@ -24,7 +24,7 @@ def hash_file(filepath, hasher): def hash_file_md5(filepath): return hash_file(filepath, hasher=hashlib.md5()) -def read_filebytes(filepath, chunk_size=bytestring.MIBIBYTE): +def read_filebytes(filepath, chunk_size=bytestring.MEBIBYTE): filepath = pathclass.Path(filepath) if not filepath.is_file: raise FileNotFoundError(filepath) diff --git a/rarpar.py b/rarpar.py index 526fa31..a64a5ba 100644 --- a/rarpar.py +++ b/rarpar.py @@ -269,7 +269,7 @@ def _normalize_volume(volume, pathsize): if volume.endswith('%'): volume = volume[:-1] volume = float(volume) / 100 - volume = (pathsize * volume) / bytestring.MIBIBYTE + volume = (pathsize * volume) / bytestring.MEBIBYTE volume = max(1, volume) return int(volume)