Skip to content

Commit

Permalink
accept .eml for restore-mbox. Fixes #313
Browse files Browse the repository at this point in the history
  • Loading branch information
jay0lee committed Apr 26, 2021
1 parent 941bae9 commit 2849eb0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2031,10 +2031,11 @@ def main(argv):
vault_label_map[fileid] = labels
elem.clear() # keep memory usage down on very large files
# Look for and restore mbox files
mbox_extensions = ['mbx', 'mbox', 'eml']
for path, subdirs, files in os.walk(options.local_folder):
for filename in files:
if filename[-4:].lower() != '.mbx' and \
filename[-5:].lower() != '.mbox':
file_extension = filename.split('.')[-1]
if file_extension not in mbox_extensions:
continue
file_path = os.path.join(path, filename)
print("\nRestoring from %s file %s..." % (humansize(file_path), file_path))
Expand Down

0 comments on commit 2849eb0

Please sign in to comment.