Skip to content

Commit

Permalink
use webdav legacy
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Oct 22, 2024
1 parent 1b4457e commit cd0a9dd
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 88 deletions.
3 changes: 1 addition & 2 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@

### Bug Fixes

- 修复侧边栏调整大小时无法正确结束的问题
- 修复任务计划创建/运行失败的问题
- 修复 Win7 无法使用 WebDAV 的问题
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"dayjs": "^1.11.13",
"express": "^5.0.1",
"iconv-lite": "^0.6.3",
"webdav": "^5.7.1",
"webdav": "legacy",
"ws": "^8.18.0",
"yaml": "^2.6.0"
},
Expand Down
120 changes: 39 additions & 81 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions src/main/resolve/backup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getAppConfig } from '../config'
import { createClient } from 'webdav'
import dayjs from 'dayjs'
import AdmZip from 'adm-zip'
import {
Expand All @@ -14,7 +15,6 @@ import {
} from '../utils/dirs'

export async function webdavBackup(): Promise<boolean> {
const { createClient } = await import('webdav/dist/node/index.js')
const {
webdavUrl = '',
webdavUsername = '',
Expand Down Expand Up @@ -48,7 +48,6 @@ export async function webdavBackup(): Promise<boolean> {
}

export async function webdavRestore(filename: string): Promise<void> {
const { createClient } = await import('webdav/dist/node/index.js')
const {
webdavUrl = '',
webdavUsername = '',
Expand All @@ -66,7 +65,6 @@ export async function webdavRestore(filename: string): Promise<void> {
}

export async function listWebdavBackups(): Promise<string[]> {
const { createClient } = await import('webdav/dist/node/index.js')
const {
webdavUrl = '',
webdavUsername = '',
Expand All @@ -87,7 +85,6 @@ export async function listWebdavBackups(): Promise<string[]> {
}

export async function webdavDelete(filename: string): Promise<void> {
const { createClient } = await import('webdav/dist/node/index.js')
const {
webdavUrl = '',
webdavUsername = '',
Expand Down

0 comments on commit cd0a9dd

Please sign in to comment.