diff options
author | drebs <drebs@riseup.net> | 2017-09-01 08:07:21 -0300 |
---|---|---|
committer | drebs <drebs@riseup.net> | 2017-09-05 11:17:08 -0300 |
commit | 654ec33efae4050f513f6e9d3f1b33c3a39dbedf (patch) | |
tree | 9ca70a036aa7c55b1681e1b36362e99a3b30fa66 /src/leap/soledad/client/_db | |
parent | 90c4c1a8e6df8bf7b6249fa83b50df7c62884d82 (diff) |
[bug] use a different name for each user's blobs db
Diffstat (limited to 'src/leap/soledad/client/_db')
-rw-r--r-- | src/leap/soledad/client/_db/blobs.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/soledad/client/_db/blobs.py b/src/leap/soledad/client/_db/blobs.py index 4a3cd913..7015ae5b 100644 --- a/src/leap/soledad/client/_db/blobs.py +++ b/src/leap/soledad/client/_db/blobs.py @@ -175,7 +175,7 @@ class BlobManager(object): cert_file=None): if local_path: mkdir_p(os.path.dirname(local_path)) - self.local = SQLiteBlobBackend(local_path, key) + self.local = SQLiteBlobBackend(local_path, key=key, user=user) self.remote = remote self.secret = secret self.user = user @@ -409,9 +409,10 @@ class BlobManager(object): class SQLiteBlobBackend(object): - def __init__(self, path, key=None): + def __init__(self, path, key=None, user=None): + dbname = '%s_blobs.db' % (user or 'soledad') self.path = os.path.abspath( - os.path.join(path, 'soledad_blob.db')) + os.path.join(path, dbname)) mkdir_p(os.path.dirname(self.path)) if not key: raise ValueError('key cannot be None') |