update fileStat()

This commit is contained in:
Thien Tran 2025-05-26 18:51:56 +08:00 committed by Louis
parent 742e731e96
commit 77f6770333
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -133,10 +133,8 @@ export default class llamacpp_extension extends AIEngine {
// otherwise, look into subdirectories // otherwise, look into subdirectories
const children = await fs.readdirSync(currentDir) const children = await fs.readdirSync(currentDir)
for (const child of children) { for (const child of children) {
// NOTE: currently fs.fileStat() output is a string
// TODO: fix this in core
// skip files // skip files
const dirInfo = await fs.fileStat(child).then(JSON.parse) const dirInfo = await fs.fileStat(child)
if (!dirInfo.isDirectory) { if (!dirInfo.isDirectory) {
continue continue
} }