Fix Local Backup Loading Failure Due to Incorrect Backup Data Saving. (#476)
# PR Checklist - [ ] Did you check if it works normally in all models? *ignore this when it dosen't uses models* - [x] Did you check if it works normally in all of web, local and node hosted versions? if it dosen't, did you blocked it in those versions? - [ ] Did you added a type def? # Description Fix https://github.com/kwaroran/RisuAI/issues/475
This commit is contained in:
@@ -115,7 +115,7 @@ export async function LoadLocalBackup(){
|
|||||||
const dbData = await decodeRisuSave(db)
|
const dbData = await decodeRisuSave(db)
|
||||||
DataBase.set(dbData)
|
DataBase.set(dbData)
|
||||||
if(isTauri){
|
if(isTauri){
|
||||||
await writeBinaryFile('database/database.bin', dbData, {dir: BaseDirectory.AppData})
|
await writeBinaryFile('database/database.bin', db, {dir: BaseDirectory.AppData})
|
||||||
relaunch()
|
relaunch()
|
||||||
alertStore.set({
|
alertStore.set({
|
||||||
type: "wait",
|
type: "wait",
|
||||||
@@ -123,7 +123,7 @@ export async function LoadLocalBackup(){
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
await forageStorage.setItem('database/database.bin', dbData)
|
await forageStorage.setItem('database/database.bin', db)
|
||||||
location.search = ''
|
location.search = ''
|
||||||
alertStore.set({
|
alertStore.set({
|
||||||
type: "wait",
|
type: "wait",
|
||||||
|
|||||||
Reference in New Issue
Block a user