mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-04-26 16:01:33 +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]
|
folder = hashes[:2]
|
||||||
flags = row[2]
|
flags = row[2]
|
||||||
if flags == 2:
|
if flags == 2:
|
||||||
os.mkdir(destination)
|
try:
|
||||||
|
os.mkdir(destination)
|
||||||
|
except FileExistsError:
|
||||||
|
pass
|
||||||
elif flags == 1:
|
elif flags == 1:
|
||||||
shutil.copyfile(f"{base_dir}/{folder}/{hashes}", destination)
|
shutil.copyfile(f"{base_dir}/{folder}/{hashes}", destination)
|
||||||
i += 1
|
i += 1
|
||||||
|
|||||||
Reference in New Issue
Block a user