mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-07-12 16:11:27 +08:00
🚧 WIP: add doge cloud support
This commit is contained in:
@@ -325,6 +325,9 @@ class SftpApi {
|
||||
let result = false
|
||||
try {
|
||||
await this.connectClient()
|
||||
if (key.replace(/^\/+/, '') === '' || key.includes('*')) {
|
||||
throw new Error('禁止删除')
|
||||
}
|
||||
const res = await this.ctx.execCommand(`rm -rf "/${key.replace(/^\/+/, '')}"`)
|
||||
this.ctx.close()
|
||||
result = this.isRequestSuccess(res.code)
|
||||
|
||||
Reference in New Issue
Block a user