Fix database loading

This commit is contained in:
shortcutme 2017-06-15 13:33:51 +02:00
parent f506ac9701
commit 0725464388
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -225,6 +225,8 @@ class Db(object):
def updateJson(self, file_path, file=None, cur=None): def updateJson(self, file_path, file=None, cur=None):
if not file_path.startswith(self.db_dir): if not file_path.startswith(self.db_dir):
return False # Not from the db dir: Skipping return False # Not from the db dir: Skipping
relative_path = file_path[len(self.db_dir):] # File path realative to db file
# Check if filename matches any of mappings in schema # Check if filename matches any of mappings in schema
matched_maps = [] matched_maps = []
for match, map_settings in self.schema["maps"].items(): for match, map_settings in self.schema["maps"].items():