mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 18:50:56 +08:00
Fix/fs-rmdir-deprecation (#3296)
This commit is contained in:
parent
65d7e24aef
commit
96cd207b1b
@ -271,12 +271,12 @@ class FileStorage {
|
||||
}
|
||||
|
||||
public clear = async (): Promise<void> => {
|
||||
await fs.promises.rmdir(this.storageDir, { recursive: true })
|
||||
await fs.promises.rm(this.storageDir, { recursive: true })
|
||||
await this.initStorageDir()
|
||||
}
|
||||
|
||||
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 })
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user