mirror of
https://github.com/clangen/musikcube.git
synced 2024-12-27 03:14:30 +00:00
Added an allow-list for libraries. Need to fill it in on Linux.
This commit is contained in:
parent
cdabafd4f2
commit
92a6be3e78
@ -7,6 +7,11 @@ const mac = process.platform === 'darwin';
|
|||||||
|
|
||||||
const filetype = mac ? '.dylib' : '.so';
|
const filetype = mac ? '.dylib' : '.so';
|
||||||
|
|
||||||
|
/* these libraries will always have dynamic dependencies, so ignore */
|
||||||
|
const ignoredLibraries = mac ? new Set([]) : new Set([]);
|
||||||
|
|
||||||
|
/* we assume these dependencies will always be available on the user's
|
||||||
|
target machine. */
|
||||||
const validLibraries = mac
|
const validLibraries = mac
|
||||||
? new Set([
|
? new Set([
|
||||||
'/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit',
|
'/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit',
|
||||||
@ -47,7 +52,9 @@ if (!path) {
|
|||||||
|
|
||||||
const ls = async (leaf) => {
|
const ls = async (leaf) => {
|
||||||
const output = await readdir(`${path}/${leaf}`);
|
const output = await readdir(`${path}/${leaf}`);
|
||||||
const files = output.filter((fn) => fn.indexOf(filetype) !== -1);
|
const files = output
|
||||||
|
.filter((fn) => fn.indexOf(filetype) !== -1)
|
||||||
|
.filter((fn) => !ignoredLibraries.has(fn));
|
||||||
return files;
|
return files;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user