|
|
|
@@ -14,13 +14,6 @@ def generateHashFile(): |
|
|
|
for root, dirs, files in os.walk(file): |
|
|
|
for file in files: |
|
|
|
path = os.path.join(root, file) |
|
|
|
if mimetypes.guess_type(file)[0] == 'text/plain': |
|
|
|
with open(path, 'r', errors='ignore') as f: |
|
|
|
data = f.read() |
|
|
|
if data.find('\r\n') == -1 : |
|
|
|
data.replace('\n','\r\n') |
|
|
|
with open(path, 'w') as f: |
|
|
|
f.write(data) |
|
|
|
with open(path, 'rb') as f: |
|
|
|
data = f.read() |
|
|
|
hashlist[path.replace('\\','/')]=hashlib.md5(data).hexdigest() |
|
|
|
|