gmvault
gmvault copied to clipboard
Skip @eaDir directories when run on a Synology NAS
I'm running on a Synology NAS and it creates some directories starting with @ and # that are used for metadata and integrity info. This patch ignores those in the _init_sub_chats_dir() method. I've been able to run through backing up all chats and its working through the emails now, without any errors. Maybe it'd be better to scan if it's starting with any special chars - I can modify this PR to do that, if you wish. Thanks!
Traceback (most recent call last):
File "/volume1/@appstore/python/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 746, in run
self._sync(args, credential)
File "/volume1/@appstore/python/lib/python2.7/site-packages/gmv/gmv_cmd.py", line 665, in _sync
restart = args['restart'], emails_only = args['emails_only'], chats_only = args['chats_only'])
File "/volume1/@appstore/python/lib/python2.7/site-packages/gmv/gmvault.py", line 633, in sync
self._sync_chats(imap_req, compress = compress_on_disk, restart = restart)
File "/volume1/@appstore/python/lib/python2.7/site-packages/gmv/gmvault.py", line 421, in _sync_chats
imap_ids = self._common_sync(timer, "chat", imap_req, compress, restart)
File "/volume1/@appstore/python/lib/python2.7/site-packages/gmv/gmvault.py", line 484, in _common_sync
the_dir = self.gstorer.get_sub_chats_dir()
File "/volume1/@appstore/python/lib/python2.7/site-packages/gmv/gmvault_db.py", line 163, in get_sub_chats_dir
self._init_sub_chats_dir()
File "/volume1/@appstore/python/lib/python2.7/site-packages/gmv/gmvault_db.py", line 137, in _init_sub_chats_dir
raise Exception("Should get 2 elements in %s" % the_split)
Exception: Should get 2 elements in ['@eaDir']
=== End of Exception traceback ===```