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)
|
||||
DataBase.set(dbData)
|
||||
if(isTauri){
|
||||
await writeBinaryFile('database/database.bin', dbData, {dir: BaseDirectory.AppData})
|
||||
await writeBinaryFile('database/database.bin', db, {dir: BaseDirectory.AppData})
|
||||
relaunch()
|
||||
alertStore.set({
|
||||
type: "wait",
|
||||
@@ -123,7 +123,7 @@ export async function LoadLocalBackup(){
|
||||
})
|
||||
}
|
||||
else{
|
||||
await forageStorage.setItem('database/database.bin', dbData)
|
||||
await forageStorage.setItem('database/database.bin', db)
|
||||
location.search = ''
|
||||
alertStore.set({
|
||||
type: "wait",
|
||||
|
||||
Reference in New Issue
Block a user