fix: optimize the storage/plugins reading logic (#6186)

This commit is contained in:
chenos 2025-02-10 12:26:56 +08:00 committed by GitHub
parent 6f5515abbc
commit ab5e9c09f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,12 @@ async function getStoragePluginNames(target) {
const items = await readdir(target);
for (const item of items) {
if (item.startsWith('@')) {
const children = await getStoragePluginNames(resolve(target, item));
const dirPath = resolve(target, item);
const s = await stat(dirPath);
if (!s.isDirectory()) {
continue;
}
const children = await getStoragePluginNames(dirPath);
plugins.push(
...children.map((child) => {
return `${item}/${child}`;