From 109b6e3ec109ac30ef73e8231374f0749589142d Mon Sep 17 00:00:00 2001 From: Alain Borel Date: Mon, 19 Jun 2023 09:05:31 +0200 Subject: [PATCH] bugfix for long path detection and uncompressed files --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index e8f2a64..09b779c 100644 --- a/main.py +++ b/main.py @@ -13,7 +13,7 @@ from functools import partial from unicodedata import normalize -version = "0.7.3" +version = "0.7.4" error_file = "ACOUA_md5_errors.txt" @@ -130,7 +130,8 @@ def runchecksum(tkroot, width_chars, check_zips): and not filename.startswith(os.path.join('.', error_file)) \ and not os.path.isdir(filename): # check for excessive expected path length locally (where libsafe will fail) - target_path = filename.replace(choosedir, libsafe_ingestion_path_prefix + foldername + '/') + target_path = libsafe_ingestion_path_prefix + foldername + filename[1:] + # print(target_path) if len(target_path) > MAX_PATH: log_message(f"WARNING > {MAX_PATH} chars for expected path + file name: {target_path}") #filename = os.path.join([str(ls.parents[0]).replace(choosedir,'.'), ls.name])