fix file condition

This commit is contained in:
Akarshan 2025-09-10 12:13:11 +05:30
parent 0eff1bfaa9
commit 84874c6039
No known key found for this signature in database
GPG Key ID: D75C9634A870665F

View File

@ -1048,7 +1048,7 @@ export default class llamacpp_extension extends AIEngine {
const archiveName = await basename(path) const archiveName = await basename(path)
logger.info(`Installing backend from path: ${path}`) logger.info(`Installing backend from path: ${path}`)
if ((await fs.existsSync(path)) && path.endsWith('tar.gz')) { if (!(await fs.existsSync(path)) && !(path.endsWith('tar.gz'))) {
logger.error(`Invalid path or file ${path}`) logger.error(`Invalid path or file ${path}`)
throw new Error(`Invalid path or file ${path}`) throw new Error(`Invalid path or file ${path}`)
} }