andrewrjones/perl5-AtomicParsley-Command — pull request #5 by jimgraham (2014-02-04 03:30:21+00:00)
Title: Use `bsd_glob` for temp file finding

If the `$replace` option is used, the file glob fails when the path has
a space in it. The glob splits paths with spaces, and then the glob
values don't match to the regex attempting to match temporary files.

Use the `File::Glob {bsd_glob}` to do globs for files with spaces in
the path. For example, the file `/Volumes/Media/TV shows/Downton
Abbey.SE01E01.mp4` would return a glob of `{ "/Volumes/Media/TV",
"Shows/Downton", "Abbey.SE01E01.mp4" }` and not match to the
temp regex of `if ( $tempfile =~ /^$directories$file.*$suffix$/ `

Unit test copies the `.mp4` file to a path with a space in it, and tests
that the set tags can be read back. If the temp file *does not*
replace the original the file won't have tags set.