mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-01-29 05:40:42 +00:00
Bug fix
Duplicated folder creation https://github.com/KnugiHK/Whatsapp-Chat-Exporter/issues/14
This commit is contained in:
@@ -115,7 +115,10 @@ def extract_media(base_dir):
|
||||
folder = hashes[:2]
|
||||
flags = row[2]
|
||||
if flags == 2:
|
||||
os.mkdir(destination)
|
||||
try:
|
||||
os.mkdir(destination)
|
||||
except FileExistsError:
|
||||
pass
|
||||
elif flags == 1:
|
||||
shutil.copyfile(f"{base_dir}/{folder}/{hashes}", destination)
|
||||
i += 1
|
||||
|
||||
Reference in New Issue
Block a user