aboutsummaryrefslogtreecommitdiffstats
path: root/js/vapi-background.js
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2019-05-12 22:06:31 +0200
committerAlessio Vanni <vannilla@firemail.cc>2019-05-12 22:06:31 +0200
commit7859df9bc216bfd9f27a8841859da20f906dfb9d (patch)
tree7e9c6e3a4a271d59f126a03dc2dbd0e567cd4c06 /js/vapi-background.js
parent5d142cf2bf9a552ef069dee02af28a2507934550 (diff)
downloadematrix-7859df9bc216bfd9f27a8841859da20f906dfb9d.tar.lz
ematrix-7859df9bc216bfd9f27a8841859da20f906dfb9d.tar.xz
ematrix-7859df9bc216bfd9f27a8841859da20f906dfb9d.zip
Migrate database from old directory
Diffstat (limited to 'js/vapi-background.js')
-rw-r--r--js/vapi-background.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/js/vapi-background.js b/js/vapi-background.js
index 719cbdf..d2a9b66 100644
--- a/js/vapi-background.js
+++ b/js/vapi-background.js
@@ -347,7 +347,7 @@ vAPI.storage = (function() {
}
// Create path
- var path = Services.dirsvc.get('ProfD', Ci.nsIFile);
+ let path = Services.dirsvc.get('ProfD', Ci.nsIFile);
path.append('ematrix-data');
if ( !path.exists() ) {
path.create(Ci.nsIFile.DIRECTORY_TYPE, parseInt('0774', 8));
@@ -355,6 +355,13 @@ vAPI.storage = (function() {
if ( !path.isDirectory() ) {
throw Error('Should be a directory...');
}
+
+ let path2 = Services.dirsvc.get('ProfD', Ci.ndIFile);
+ path2.append('extension-data');
+ if (path2.exists()) {
+ path2.append(location.host + '.sqlite');
+ path2.copyTo(path, location.host + '.sqlite');
+ }
path.append(location.host + '.sqlite');
// Open database
@@ -488,6 +495,7 @@ vAPI.storage = (function() {
}
var prepareResult = function(result) {
+ console.debug(result);
var key;
for ( key in result ) {
if ( result.hasOwnProperty(key) === false ) {