Fix drive backup & rust warning
This commit is contained in:
@@ -424,7 +424,7 @@ fn main() {
|
|||||||
|
|
||||||
#[cfg(desktop)]
|
#[cfg(desktop)]
|
||||||
{
|
{
|
||||||
builder = builder.plugin(tauri_plugin_single_instance::init(|app, args, cwd| {
|
builder = builder.plugin(tauri_plugin_single_instance::init(|app, _args, _cwd| {
|
||||||
let _ = app
|
let _ = app
|
||||||
.get_webview_window("main")
|
.get_webview_window("main")
|
||||||
.expect("no main window")
|
.expect("no main window")
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export async function SaveLocalBackup(){
|
|||||||
if(!key || !key.endsWith('.png')){
|
if(!key || !key.endsWith('.png')){
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
await writer.writeBackup(key, await readFile(asset.name, {baseDir: BaseDirectory.AppData}))
|
await writer.writeBackup(key, await readFile('assets/' + asset.name, {baseDir: BaseDirectory.AppData}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import { forageStorage, getUnpargeables, isTauri, openURL } from "../storage/glo
|
|||||||
import { BaseDirectory, exists, readFile, readDir, writeFile } from "@tauri-apps/plugin-fs";
|
import { BaseDirectory, exists, readFile, readDir, writeFile } from "@tauri-apps/plugin-fs";
|
||||||
import { language } from "../../lang";
|
import { language } from "../../lang";
|
||||||
import { relaunch } from '@tauri-apps/plugin-process';
|
import { relaunch } from '@tauri-apps/plugin-process';
|
||||||
import { isEqual } from "lodash";
|
|
||||||
import { sleep } from "../util";
|
import { sleep } from "../util";
|
||||||
import { hubURL } from "../characterCards";
|
import { hubURL } from "../characterCards";
|
||||||
import { decodeRisuSave, encodeRisuSave } from "../storage/risuSave";
|
import { decodeRisuSave, encodeRisuSave } from "../storage/risuSave";
|
||||||
@@ -155,7 +154,7 @@ async function backupDrive(ACCESS_TOKEN:string) {
|
|||||||
}
|
}
|
||||||
const formatedKey = newFormatKeys(key)
|
const formatedKey = newFormatKeys(key)
|
||||||
if(!fileNames.includes(formatedKey)){
|
if(!fileNames.includes(formatedKey)){
|
||||||
await createFileInFolder(ACCESS_TOKEN, formatedKey, await readFile(asset.name, {baseDir: BaseDirectory.AppData}))
|
await createFileInFolder(ACCESS_TOKEN, formatedKey, await readFile('assets/' + asset.name, {baseDir: BaseDirectory.AppData}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -445,6 +445,7 @@ export function setDatabase(data:Database){
|
|||||||
data.customQuotesData ??= ['“','”','‘','’']
|
data.customQuotesData ??= ['“','”','‘','’']
|
||||||
data.groupOtherBotRole ??= 'user'
|
data.groupOtherBotRole ??= 'user'
|
||||||
data.customGUI ??= ''
|
data.customGUI ??= ''
|
||||||
|
data.theme = ''
|
||||||
changeLanguage(data.language)
|
changeLanguage(data.language)
|
||||||
DataBase.set(data)
|
DataBase.set(data)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user