fix: add await

This commit is contained in:
Wesley F. Young 2024-09-06 23:45:21 +08:00
parent 0a6a9572d1
commit 725fce7c4c

View File

@ -15,7 +15,7 @@ export class LaanaMessageActionHandler {
let cacheSize = 0; let cacheSize = 0;
try { try {
for (const cacheId of fileCacheIds) { for (const cacheId of fileCacheIds) {
cacheSize += fs.statSync(this.laana.utils.file.toLocalPath(cacheId)).size; cacheSize += fs.statSync(await this.laana.utils.file.toLocalPath(cacheId)).size;
} }
} catch (e) { } catch (e) {
this.core.context.logger.logWarn('文件缓存大小计算失败', e); this.core.context.logger.logWarn('文件缓存大小计算失败', e);