summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap')
-rw-r--r--src/leap/soledad/client/_db/blobs.py7
-rw-r--r--src/leap/soledad/client/api.py2
2 files changed, 5 insertions, 4 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')
diff --git a/src/leap/soledad/client/api.py b/src/leap/soledad/client/api.py
index 50f7e5aa..7171761d 100644
--- a/src/leap/soledad/client/api.py
+++ b/src/leap/soledad/client/api.py
@@ -275,7 +275,7 @@ class Soledad(object):
return sync_phase, sync_exchange_phase
def _init_blobmanager(self):
- path = os.path.join(os.path.dirname(self._local_db_path), 'blobs')
+ path = os.path.dirname(self._local_db_path)
url = urlparse.urljoin(self.server_url, 'blobs/%s' % self.uuid)
key = self._secrets.local_key
self.blobmanager = blobs.BlobManager(