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

Broken behaviour in glob() #8

Open
aflatter opened this issue Jan 24, 2011 · 2 comments
Open

Broken behaviour in glob() #8

aflatter opened this issue Jan 24, 2011 · 2 comments

Comments

@aflatter
Copy link

glob finds files that should not match my pattern. Interesting enough, this happens only on the first level.

xy:/tmp/foo$ ls -R .
.:
test  test.js

./test:
dir1  file1.foo  file2.foo  file5.bar

./test/dir1:
file3.foo  file4.bar

xy:/tmp/foo$ cat test.js
var sys   = require('sys'),
    async = require('asyncjs');

async.glob(__dirname + '/test/*/*.foo').toArray(function(err, files) {
  sys.puts(sys.inspect(files));               
});

xy:/tmp/foo$ node test.js
[ { path: '/tmp/foo/test/file1.foo', name: 'file1.foo' }
, { path: '/tmp/foo/test/file5.bar', name: 'file5.bar' }
, { path: '/tmp/foo/test/file2.foo', name: 'file2.foo' }
, { path: '/tmp/foo/test/dir1/file3.foo'
  , name: 'file3.foo'
  , stat: { ... }
  }
]
@aflatter
Copy link
Author

You might think about just using https://github.com/isaacs/node-glob/

@fjakobs
Copy link
Owner

fjakobs commented Jan 25, 2011

Stange. Thanks for the bug report

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

2 participants