defunkt/fakefs — pull request #132 by lytithwyn (2012-05-08 20:24:31+00:00)
Title: Fix FilesSstem.find_recurser

These commits add a test and a fix for a bug triggered where, given a set of files like this,

/mypath/my.file
/mypath/my-file

calling File.directory? will thrown an exception. FilesSystem.find_recurser was treating the "." in the filename as a regex wildcard, which made both paths match. File.directory? was expecting to receive a path from FileSystem.find but instead was receiving an array.

The fix simply protects periods in the path from being treated as wildcards.

I actually figured out how to run the tests properly this time so I shouldn't have caused any regressions. ;) Also, I couldn't think of a good name for the test so I won't mind if someone wants to change it.