Fix/fs-rmdir-deprecation (#3296)

This commit is contained in:
Hao He 2025-03-13 20:45:45 +08:00 committed by GitHub
parent f8361d50e7
commit 8b2c1cbe99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -271,12 +271,12 @@ class FileStorage {
} }
public clear = async (): Promise<void> => { public clear = async (): Promise<void> => {
await fs.promises.rmdir(this.storageDir, { recursive: true }) await fs.promises.rm(this.storageDir, { recursive: true })
await this.initStorageDir() await this.initStorageDir()
} }
public clearTemp = async (): Promise<void> => { public clearTemp = async (): Promise<void> => {
await fs.promises.rmdir(this.tempDir, { recursive: true }) await fs.promises.rm(this.tempDir, { recursive: true })
await fs.promises.mkdir(this.tempDir, { recursive: true }) await fs.promises.mkdir(this.tempDir, { recursive: true })
} }