From b2025d95324c4365822e8c94518a207dd9c2325d Mon Sep 17 00:00:00 2001 From: NoHomoBoi <36680385+KiritoDv@users.noreply.github.com> Date: Tue, 11 Aug 2020 19:44:11 -0500 Subject: [PATCH] Fixed md5 validation --- tools/mkzip.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/mkzip.py b/tools/mkzip.py index 07f28577..ffe0153c 100644 --- a/tools/mkzip.py +++ b/tools/mkzip.py @@ -30,8 +30,7 @@ with open(sys.argv[1], 'r') as f: for (fname, aname) in lst: path = os.path.join(sys.argv[2], aname) old_md5 = md5(fname); - new_md5 = md5(path); - if not os.path.exists(path) or old_md5 != new_md5: + if not os.path.exists(path) or os.path.exists(path) and old_md5 != md5(path): os.makedirs(os.path.dirname(path), exist_ok=True) copyfile(fname, path) print("Copying: " + path)