Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacOS ignore "/Contents/" by default #616

Open
kmturley opened this issue Jan 11, 2025 · 1 comment
Open

MacOS ignore "/Contents/" by default #616

kmturley opened this issue Jan 11, 2025 · 1 comment

Comments

@kmturley
Copy link

On MacOS if I run:

import { globSync } from 'glob';
const files = globSync('./plugins/**/*.*');
console.log(files);

The output is:

[
  'plugins/Surge XT Effects.app',
  'plugins/Surge XT Effects.app/Contents/Info.plist',
  'plugins/Surge XT Effects.app/Contents/Resources/RecentFilesMenuTemplate.nib',
  'plugins/Surge XT Effects.app/Contents/Resources/Icon.icns'
]

If I change to:

import { globSync } from 'glob';
const files = globSync('./plugins/**/*.*', { ignore: ['./plugins/**/Contents/**/*'] });
console.log(files);

The output is:

[
  'plugins/Surge XT Effects.app',
]

My assumption is that most users want want the "file" as shown in the UI, vs the contents of the package.

  1. Should the default functionality be to hide the Contents directory?
  2. Could there be a helper to switch this feature on/off without specifying an ignore negation rule?
@kmturley
Copy link
Author

This also could affect Windows:

[
  'plugins\\Surge XT Effects.vst3',
  'plugins\\Surge XT Effects.vst3\\Plugin.ico',
  'plugins\\Surge XT Effects.vst3\\desktop.ini',
  'plugins\\Surge XT Effects.vst3\\Contents\\x86_64-win\\Surge XT Effects.vst3'
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant