Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip @eaDir directories when run on a Synology NAS #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nabeelio
Copy link

@nabeelio nabeelio commented May 28, 2017

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 ===```

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

```  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']```
@nabeelio nabeelio changed the title Skip @eaDir directories Skip @eaDir directories when run on a Synology NAS May 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant