question about glob function

Questions about Wine on Linux
Locked
Fred2
Level 2
Level 2
Posts: 45
Joined: Mon Jul 18, 2011 11:58 am

question about glob function

Post by Fred2 »

I use a Windows software that uses the Ruby "glob" function to get files in a directory. This is baked in and I don't have access to the source code. On both Windows and OS X it gives sorted results but not on Linux. As already said I am not able to just call a Ruby sort function afterwards, because it is used like that internally under the assumption it would be sorted.

A little research showed that Ruby's glob function is based on the operating system's glob function, and glob returns no sorted results
  • on Linux, running Ruby in Wine 1.5.26
  • on Linux, running native (Linux) Ruby
  • on Linux, running Windows Ruby in VirtualBox accessing files on a ext4 network drive (this could have to do with the VirtualBox driver)
It is unclear to me a) whether it is a bug and b) where to file the bug (is it in the system's glob, ext4, Ruby, Wine, VirtualBox?)
However it does cause problems when running Windows software that assumes Windows' glob is sorted.
Attachments
Left: glob returns sorted results when running Ruby 1.8.7 on Windows XP;<br />Right: glob returns reproducible but unsorted results when running Ruby 1.8.7 in Wine 1.5.26
Left: glob returns sorted results when running Ruby 1.8.7 on Windows XP;
Right: glob returns reproducible but unsorted results when running Ruby 1.8.7 in Wine 1.5.26
Locked