mirror of
https://github.com/kevinveenbirkenbach/duplicate-file-handler.git
synced 2024-11-22 05:51: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)
|
||||
return hash_md5.hexdigest()
|
||||
|
||||
def find_duplicates(directories, file_type=None):
|
||||
def find_duplicates(directories, file_type):
|
||||
hashes = defaultdict(list)
|
||||
for directory in directories:
|
||||
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):
|
||||
directories = args.directories
|
||||
apply_to = args.apply_to or directories
|
||||
duplicates = find_duplicates(directories)
|
||||
duplicates = find_duplicates(directories,args.file_type)
|
||||
|
||||
if not duplicates:
|
||||
print("No duplicates found.")
|
||||
|
Loading…
Reference in New Issue
Block a user