mirror of https://github.com/sm64pc/sm64pc.git
Fixed md5 validation
This commit is contained in:
parent
c9fe88e193
commit
b2025d9532
|
@ -30,8 +30,7 @@ with open(sys.argv[1], 'r') as f:
|
||||||
for (fname, aname) in lst:
|
for (fname, aname) in lst:
|
||||||
path = os.path.join(sys.argv[2], aname)
|
path = os.path.join(sys.argv[2], aname)
|
||||||
old_md5 = md5(fname);
|
old_md5 = md5(fname);
|
||||||
new_md5 = md5(path);
|
if not os.path.exists(path) or os.path.exists(path) and old_md5 != md5(path):
|
||||||
if not os.path.exists(path) or old_md5 != new_md5:
|
|
||||||
os.makedirs(os.path.dirname(path), exist_ok=True)
|
os.makedirs(os.path.dirname(path), exist_ok=True)
|
||||||
copyfile(fname, path)
|
copyfile(fname, path)
|
||||||
print("Copying: " + path)
|
print("Copying: " + path)
|
||||||
|
|
Loading…
Reference in New Issue