Skip to content

Commit

Permalink
[Truffle] Fixed directory globbing on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvdrum committed Dec 31, 2014
1 parent 2008fd8 commit fb9199f
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -123,7 +123,8 @@ private static RubyArray glob(final RubyContext context, String glob) {

final String prefix = absoluteGlob.substring(0, prefixLength - 1);

final PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:" + absoluteGlob.substring(prefixLength));
// Glob patterns must always use '/', even on Windows.
final PathMatcher matcher = FileSystems.getDefault().getPathMatcher("glob:" + absoluteGlob.substring(prefixLength).replace('\\', '/'));

final RubyArray array = new RubyArray(context.getCoreLibrary().getArrayClass());

Expand Down

0 comments on commit fb9199f

Please sign in to comment.