aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-03-12 13:19:04 +0100
committerMarvin W <git@larma.de>2017-03-12 14:09:32 +0100
commite8f11178ecc1a333976ba713f532fcae11931b16 (patch)
tree71ef4de63e27203780f3d5bfaa1662d97faaca16 /plugins/omemo/src
parenta9ea0e9f87e71c60bc570066525d3e3634fbdcc0 (diff)
downloaddino-e8f11178ecc1a333976ba713f532fcae11931b16.tar.gz
dino-e8f11178ecc1a333976ba713f532fcae11931b16.zip
Move storage into user directory and fix plugin search path
Diffstat (limited to 'plugins/omemo/src')
-rw-r--r--plugins/omemo/src/plugin.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/omemo/src/plugin.vala b/plugins/omemo/src/plugin.vala
index 04e02625..d3fee15d 100644
--- a/plugins/omemo/src/plugin.vala
+++ b/plugins/omemo/src/plugin.vala
@@ -9,10 +9,15 @@ public class Plugin : RootInterface, Object {
public AccountSettingsEntry settings_entry;
public void registered(Dino.Application app) {
+ // FIXME: Legacy import
+ if (FileUtils.test("omemo.db", FileTest.IS_REGULAR)) {
+ FileUtils.rename("omemo.db", Path.build_filename(Application.get_storage_dir(), "omemo.db"));
+ }
+
try {
context = new Signal.Context(false);
this.app = app;
- this.db = new Database("omemo.db");
+ this.db = new Database(Path.build_filename(Application.get_storage_dir(), "omemo.db"));
this.list_entry = new EncryptionListEntry(this);
this.settings_entry = new AccountSettingsEntry(this);
this.app.plugin_registry.register_encryption_list_entry(list_entry);