mde/jake — pull request #165 by wvl (2012-12-05 21:55:13+00:00)
Title: Allow files to be globbed from absolute paths:

jake.basedir in `utilities` would return '/' if
an absolute path was given to FileList. This means
jake would try to read the entire filesystem (which
in my case failed with permission errors). Also,
this function only returns the first segment of the
path, so that if you wanted to glob `lib/models/*.js`
say, it would read the entire `lib` directory,
instead of `lib/models`.

I pulled this function inline (I'm not sure what
else depends on the existing functionality), and
made it return the deepest directory that does
not contain a glob character.