1
This commit is contained in:
parent
497cc19484
commit
5c9a5eb8ba
@ -23,9 +23,13 @@ class NeDBManager {
|
||||
}
|
||||
|
||||
public async initialize(): Promise<void> {
|
||||
// 如果已经初始化,直接返回
|
||||
if (this.isInitialized) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// 确保数据目录存在
|
||||
// 确保目录存在
|
||||
if (!fs.existsSync(this.dataDir)) {
|
||||
fs.mkdirSync(this.dataDir, { recursive: true });
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user