lib/audioinfo/album.rb in ruby-audioinfo-0.3.1 vs lib/audioinfo/album.rb in ruby-audioinfo-0.3.2
- old
+ new
@@ -10,9 +10,10 @@
attr_reader :files, :discnum, :multicd, :basename, :infos, :path
# return the list of images in the album directory, with "folder.*" in first
def self.images(path)
+ path = path.dup.force_encoding("binary")
arr = Dir.glob( File.join(path, "*.{#{IMAGE_EXTENSIONS.join(",")}}"), File::FNM_CASEFOLD).collect do |f|
File.expand_path(f)
end
# move "folder.*" image on top of the array
if folder = arr.detect { |f| f =~ /folder\.[^.]+$/ }