I have a line in an application like this (search the given directory for ogg and mp3 files):
Dir.glob "#{ARGV[0]}/**/*.{ogg,mp3}", File::FNM_CASEFOLD
Using Ruby 1.9.3, this raises an error:
test.rb:1:in `glob': invalid byte sequence in UTF-8 (ArgumentError)
from test.rb:1:in `<main>'
I guess I have a weird file name somewhere. However, if I drop the File::FNM_CASEFOLD, then it works fine.
Is there a way to work around this, or at least not stop the globbing when this occurs? Or am I running into a bug?
Thanks,
Justin