Co-authored-by: kanweiwei <kanweiwei@nutstore.net>
This commit is contained in:
parent
5cdf4eff77
commit
515721239f
@ -123,7 +123,7 @@ export async function backupToNutstore({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function restoreFromNutstore() {
|
export async function restoreFromNutstore(fileName?: string) {
|
||||||
const nutstoreToken = getNutstoreToken()
|
const nutstoreToken = getNutstoreToken()
|
||||||
if (!nutstoreToken) {
|
if (!nutstoreToken) {
|
||||||
return
|
return
|
||||||
@ -137,7 +137,7 @@ export async function restoreFromNutstore() {
|
|||||||
let data = ''
|
let data = ''
|
||||||
|
|
||||||
try {
|
try {
|
||||||
data = await window.api.backup.restoreFromWebdav(config)
|
data = await window.api.backup.restoreFromWebdav({ ...config, fileName })
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
console.error('[backup] restoreFromWebdav: Error downloading file from WebDAV:', error)
|
console.error('[backup] restoreFromWebdav: Error downloading file from WebDAV:', error)
|
||||||
window.modal.error({
|
window.modal.error({
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user