Change 'Build-tools/Do-compile' from 'system("rm -f ...");' to 'unlink()' to ensure

it also works on file names with special characters.
This commit is contained in:
joerg@mysql.com 2005-02-10 14:33:27 +01:00
parent 587584f135
commit a710d10637

View file

@ -729,7 +729,7 @@ sub find
sub rm_all
{
my(@rm_files)=@_;
my($dir,$current_dir,@files,@dirs);
my($dir,$current_dir,@files,@dirs,$removed);
$current_dir = `pwd`; chomp($current_dir);
foreach $dir (@rm_files)
@ -753,7 +753,9 @@ sub rm_all
}
if ($#files >= 0)
{
system("rm -f " . join(" ",@files)) && abort("Can't remove files from $dir");
$removed= unlink @files;
print "rm_all : removed $removed files in $current_dir/$dir\n" if ($opt_debug);
abort("Can't remove all $#files+1 from $current_dir/$dir, just $removed") if $removed != $#files+1;
}
foreach $dir (@dirs)
{