From 71d31c293f7cf7b616446466f9beb0061e063af8 Mon Sep 17 00:00:00 2001 From: Nabeel Shahzad Date: Sun, 28 May 2017 15:05:31 -0500 Subject: [PATCH] Skip @eaDir directories 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']``` --- src/gmv/gmvault_db.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gmv/gmvault_db.py b/src/gmv/gmvault_db.py index c06407a2..283a47b8 100755 --- a/src/gmv/gmvault_db.py +++ b/src/gmv/gmvault_db.py @@ -129,6 +129,9 @@ def _init_sub_chats_dir(self): if os.path.exists(self._chats_dir): dirs = os.listdir(self._chats_dir) for the_dir in dirs: + if the_dir.startswith('@') or the_dir.startswith('#'): + continue + the_split = the_dir.split("-") if len(the_split) != 2: raise Exception("Should get 2 elements in %s" % the_split)