Skip to content

Commit 12f4c85

Browse files
committed
fix: ignore .DS_Store during addon discovery
1 parent 3fe2f69 commit 12f4c85

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

client/src/addon_manager/services/addonManager.service.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ class AddonManager {
3131
});
3232
}
3333

34-
const addons = await filesystem.readDirectory(installLocation);
35-
36-
for (const addon of addons ?? []) {
34+
const ignoreList = [".DS_Store"];
35+
let addons = await filesystem.readDirectory(installLocation);
36+
if (!addons) {
37+
localLogger.warn("No addons found in installation folder");
38+
return;
39+
}
40+
addons = addons.filter((a) => !ignoreList.includes(a.name));
41+
for (const addon of addons) {
3742
this.addons.set(addon.name, new Addon(addon.name, addon.uri));
3843
localLogger.verbose(`Found ${addon.name}`);
3944
}

0 commit comments

Comments
 (0)