Subject: | _patch_command() not safe under paths with spaces |
If the current directory is under a path with a space in it (such as
on OS X leopard "/Users/$user/Library/Application
Support/.cpan/build/..."), the system($string) form will fail unless
the filename is escaped in a shell-safe way.
print "Applying patch: ", $i, "\n";
my $cmd = $self->_patch_command( $old_dir, $i );
print $cmd, "\n";
system $cmd and die 'Error: ', $?;
I would rather see that done as system(@command), but of course that
requires input to be handled other than with '<'. Perhaps
inc/bin/patch could take the patchfile as an argument?
--Eric