Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a2ed34abf3 | ||
|
|
36a7b7b91a | ||
|
|
b4e8b7375f | ||
|
|
153b635bdb | ||
|
|
80af72465e | ||
|
|
a91a8f9993 |
@@ -75,7 +75,12 @@ class ServerStorage extends Vue {
|
|||||||
async serverSyncEnabledChanged() {
|
async serverSyncEnabledChanged() {
|
||||||
if (this.serverSyncEnabled) {
|
if (this.serverSyncEnabled) {
|
||||||
this.prevServerStorageKey = null;
|
this.prevServerStorageKey = null;
|
||||||
await this.serverStorageKeyChanged(true);
|
if (!this.serverStorageKey) {
|
||||||
|
//генерируем новый ключ
|
||||||
|
await this.generateNewServerStorageKey();
|
||||||
|
} else {
|
||||||
|
await this.serverStorageKeyChanged(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Liberama",
|
"name": "Liberama",
|
||||||
"version": "0.6.0",
|
"version": "0.6.2",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.0.0"
|
"node": ">=10.0.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ class ConnManager {
|
|||||||
const dbFileName = this.config.dataDir + '/' + poolConfig.fileName;
|
const dbFileName = this.config.dataDir + '/' + poolConfig.fileName;
|
||||||
|
|
||||||
//бэкап
|
//бэкап
|
||||||
await fs.copy(dbFileName, `${dbFileName}.bak`);
|
if (await fs.pathExists(dbFileName))
|
||||||
|
await fs.copy(dbFileName, `${dbFileName}.bak`);
|
||||||
|
|
||||||
const connPool = new SqliteConnectionPool();
|
const connPool = new SqliteConnectionPool();
|
||||||
await connPool.open(poolConfig.connCount, dbFileName);
|
await connPool.open(poolConfig.connCount, dbFileName);
|
||||||
|
|||||||
Reference in New Issue
Block a user