|
|
@ -64,9 +64,9 @@ def decode_par2(parfile: str) -> List[str]: |
|
|
|
with open(filepath, "rb") as fileToMatch: |
|
|
|
first16k_data = fileToMatch.read(16384) |
|
|
|
|
|
|
|
# Check if we have this hash |
|
|
|
# Check if we have this hash and the filename is different |
|
|
|
file_md5of16k = hashlib.md5(first16k_data).digest() |
|
|
|
if file_md5of16k in md5of16k: |
|
|
|
if file_md5of16k in md5of16k and fn != md5of16k[file_md5of16k]: |
|
|
|
new_path = os.path.join(dirname, md5of16k[file_md5of16k]) |
|
|
|
# Make sure it's a unique name |
|
|
|
unique_filename = get_unique_filename(new_path) |
|
|
|