mirror of
https://github.com/kevinveenbirkenbach/duplicate-file-handler.git
synced 2024-11-15 02:21:03 +01:00
Solved filetype bug
This commit is contained in:
parent
9e815c6854
commit
62dc1e1250
4
main.py
4
main.py
@ -10,7 +10,7 @@ def md5sum(filename):
|
|||||||
hash_md5.update(chunk)
|
hash_md5.update(chunk)
|
||||||
return hash_md5.hexdigest()
|
return hash_md5.hexdigest()
|
||||||
|
|
||||||
def find_duplicates(directories, file_type=None):
|
def find_duplicates(directories, file_type):
|
||||||
hashes = defaultdict(list)
|
hashes = defaultdict(list)
|
||||||
for directory in directories:
|
for directory in directories:
|
||||||
for root, dirs, files in os.walk(directory, followlinks=False):
|
for root, dirs, files in os.walk(directory, followlinks=False):
|
||||||
@ -60,7 +60,7 @@ def handle_modification(files, modification, mode, apply_to):
|
|||||||
def main(args):
|
def main(args):
|
||||||
directories = args.directories
|
directories = args.directories
|
||||||
apply_to = args.apply_to or directories
|
apply_to = args.apply_to or directories
|
||||||
duplicates = find_duplicates(directories)
|
duplicates = find_duplicates(directories,args.file_type)
|
||||||
|
|
||||||
if not duplicates:
|
if not duplicates:
|
||||||
print("No duplicates found.")
|
print("No duplicates found.")
|
||||||
|
Loading…
Reference in New Issue
Block a user